summaryrefslogtreecommitdiff
path: root/tests/napi/object_wrap_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/napi/object_wrap_test.js')
-rw-r--r--tests/napi/object_wrap_test.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/napi/object_wrap_test.js b/tests/napi/object_wrap_test.js
index de6391fb1..ee6d4af86 100644
--- a/tests/napi/object_wrap_test.js
+++ b/tests/napi/object_wrap_test.js
@@ -40,3 +40,11 @@ Deno.test("napi external arraybuffer", function () {
assertEquals(new Uint8Array(buf), new Uint8Array([1, 2, 3]));
buf = null;
});
+
+Deno.test("napi object wrap userland owned", function () {
+ let obj = new objectWrap.NapiObjectOwned(1);
+ assertEquals(obj.get_value(), 1);
+ obj = null;
+ // force finalize callback to get called
+ globalThis.gc();
+});