diff options
Diffstat (limited to 'test_napi/common.js')
-rw-r--r-- | test_napi/common.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test_napi/common.js b/test_napi/common.js index ce9b2544b..5ad0e9cf3 100644 --- a/test_napi/common.js +++ b/test_napi/common.js @@ -7,6 +7,7 @@ export { assertThrows, } from "../test_util/std/testing/asserts.ts"; export { fromFileUrl } from "../test_util/std/path/mod.ts"; +import process from "node:process"; const targetDir = Deno.execPath().replace(/[^\/\\]+$/, ""); export const [libPrefix, libSuffix] = { @@ -15,13 +16,11 @@ export const [libPrefix, libSuffix] = { windows: ["", "dll"], }[Deno.build.os]; -const ops = Deno[Deno.internal].core.ops; - export function loadTestLibrary() { const specifier = `${targetDir}/${libPrefix}test_napi.${libSuffix}`; // Internal, used in ext/node - return ops.op_napi_open(specifier, { - Buffer: {}, - }); + const module = {}; + process.dlopen(module, specifier); + return module.exports; } |