From 5919f31891f464fb8975084795550d7e731c12de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 19 Jul 2023 12:36:52 +0200 Subject: [PATCH] fix(napi): update env_test.js (#19876) --- test_napi/env_test.js | 4 +--- test_napi/src/env.rs | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/test_napi/env_test.js b/test_napi/env_test.js index 8ec12a5340..0d509d6d6b 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 620aeec297..c91bc5883e 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 }