summaryrefslogtreecommitdiff
path: root/test_napi/object_wrap_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test_napi/object_wrap_test.js')
-rw-r--r--test_napi/object_wrap_test.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/test_napi/object_wrap_test.js b/test_napi/object_wrap_test.js
deleted file mode 100644
index f79fd08f8..000000000
--- a/test_napi/object_wrap_test.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-
-import { assert, assertEquals, loadTestLibrary } from "./common.js";
-
-const objectWrap = loadTestLibrary();
-
-Deno.test("napi object wrap new", function () {
- const obj = new objectWrap.NapiObject(0);
- assertEquals(obj.get_value(), 0);
- obj.set_value(10);
- assertEquals(obj.get_value(), 10);
- obj.increment();
- assertEquals(obj.get_value(), 11);
- obj.increment();
- obj.set_value(10);
- assertEquals(obj.get_value(), 10);
- assertEquals(objectWrap.NapiObject.factory(), 64);
-});
-
-Deno.test("napi bind finalizer", function () {
- const obj = {};
- objectWrap.test_bind_finalizer(obj);
-});
-
-Deno.test("napi external finalizer", function () {
- let obj = objectWrap.test_external_finalizer();
- assert(obj);
- obj = null;
-});
-
-Deno.test("napi external buffer", function () {
- let buf = objectWrap.test_external_buffer();
- assertEquals(buf, new Uint8Array([1, 2, 3]));
- buf = null;
-});
-
-Deno.test("napi external arraybuffer", function () {
- let buf = objectWrap.test_external_arraybuffer();
- assertEquals(new Uint8Array(buf), new Uint8Array([1, 2, 3]));
- buf = null;
-});