mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
fix(napi): return node globalThis from napi_get_global (#17613)
Fixes https://github.com/denoland/deno/issues/17587
This commit is contained in:
parent
1b46b2f0e4
commit
524bccdf6a
7 changed files with 68 additions and 6 deletions
12
test_napi/env_test.js
Normal file
12
test_napi/env_test.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
import { assert, loadTestLibrary } from "./common.js";
|
||||
|
||||
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);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue