mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(napi): update env_test.js (#19876)
This commit is contained in:
parent
e511022c74
commit
5919f31891
2 changed files with 1 additions and 11 deletions
|
@ -6,7 +6,5 @@ const env = loadTestLibrary();
|
||||||
|
|
||||||
Deno.test("napi get global", function () {
|
Deno.test("napi get global", function () {
|
||||||
const g = env.testNodeGlobal();
|
const g = env.testNodeGlobal();
|
||||||
// Note: global is a mock object in the tests.
|
assert(g === globalThis);
|
||||||
// See common.js
|
|
||||||
assert(g.Buffer);
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,14 +15,6 @@ extern "C" fn get_node_global(
|
||||||
let mut result: napi_value = std::ptr::null_mut();
|
let mut result: napi_value = std::ptr::null_mut();
|
||||||
assert_napi_ok!(napi_get_global(env, &mut result));
|
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
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue