From e3b2ee183bc7497ec0432bc764678f5eda6495a7 Mon Sep 17 00:00:00 2001 From: snek Date: Mon, 10 Jun 2024 09:20:44 -0700 Subject: fix: Rewrite Node-API (#24101) Phase 1 node-api rewrite --- tests/napi/init_test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/napi/init_test.js') diff --git a/tests/napi/init_test.js b/tests/napi/init_test.js index 5f2507876..9db99d8a0 100644 --- a/tests/napi/init_test.js +++ b/tests/napi/init_test.js @@ -1,5 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +import { Buffer } from "node:buffer"; import { assert, libSuffix } from "./common.js"; const ops = Deno[Deno.internal].core.ops; @@ -8,7 +9,7 @@ Deno.test("ctr initialization (napi_module_register)", { ignore: Deno.build.os == "windows", }, function () { const path = new URL(`./module.${libSuffix}`, import.meta.url).pathname; - const obj = ops.op_napi_open(path, {}); + const obj = ops.op_napi_open(path, {}, Buffer, reportError); assert(obj != null); assert(typeof obj === "object"); }); -- cgit v1.2.3