diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-07-19 12:36:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 12:36:52 +0200 |
commit | 5919f31891f464fb8975084795550d7e731c12de (patch) | |
tree | f6437a2088d6ce74f638703f34ebb3eaff7e3303 | |
parent | e511022c7445cc22193edb1626c77d9674935425 (diff) |
fix(napi): update env_test.js (#19876)
-rw-r--r-- | test_napi/env_test.js | 4 | ||||
-rw-r--r-- | test_napi/src/env.rs | 8 |
2 files changed, 1 insertions, 11 deletions
diff --git a/test_napi/env_test.js b/test_napi/env_test.js index 8ec12a534..0d509d6d6 100644 --- a/test_napi/env_test.js +++ b/test_napi/env_test.js @@ -6,7 +6,5 @@ const env = loadTestLibrary(); Deno.test("napi get global", function () { const g = env.testNodeGlobal(); - // Note: global is a mock object in the tests. - // See common.js - assert(g.Buffer); + assert(g === globalThis); }); diff --git a/test_napi/src/env.rs b/test_napi/src/env.rs index 620aeec29..c91bc5883 100644 --- a/test_napi/src/env.rs +++ b/test_napi/src/env.rs @@ -15,14 +15,6 @@ extern "C" fn get_node_global( let mut result: napi_value = std::ptr::null_mut(); assert_napi_ok!(napi_get_global(env, &mut result)); - let mut r1: napi_value = std::ptr::null_mut(); - assert_napi_ok!(napi_get_named_property( - env, - result, - "Buffer\0".as_ptr() as _, - &mut r1 - )); - result } |