From 524bccdf6aa20ee4ba76dc7291d77b4c98fa7e28 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 1 Feb 2023 06:41:04 -0800 Subject: fix(napi): return node globalThis from napi_get_global (#17613) Fixes https://github.com/denoland/deno/issues/17587 --- test_napi/env_test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test_napi/env_test.js (limited to 'test_napi/env_test.js') 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); +}); -- cgit v1.2.3