summaryrefslogtreecommitdiff
path: root/test_napi/env_test.js
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-02-01 06:41:04 -0800
committerGitHub <noreply@github.com>2023-02-01 15:41:04 +0100
commit524bccdf6aa20ee4ba76dc7291d77b4c98fa7e28 (patch)
treea312f7fadf6a086f37bcc5326b42efbe114617be /test_napi/env_test.js
parent1b46b2f0e47b93635b8f225f43bb82fd79dd31dc (diff)
fix(napi): return node globalThis from napi_get_global (#17613)
Fixes https://github.com/denoland/deno/issues/17587
Diffstat (limited to 'test_napi/env_test.js')
-rw-r--r--test_napi/env_test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test_napi/env_test.js b/test_napi/env_test.js
new file mode 100644
index 000000000..8ec12a534
--- /dev/null
+++ b/test_napi/env_test.js
@@ -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);
+});