diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2024-07-19 12:37:08 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 12:37:08 +0900 |
commit | 76b8ecbb6d8c07d29c34fb0b301cc3bf3351e3aa (patch) | |
tree | 228b5bde74244c0a844d61257530d1b8e2eef9e4 /tests/testdata/npm/compare_globals/main.ts | |
parent | 3bda8eb4fe059fd79a522c9277a5a872f75dc270 (diff) |
fix(ext/node): do not expose `self` global in node (#24637)
closes #23727
Diffstat (limited to 'tests/testdata/npm/compare_globals/main.ts')
-rw-r--r-- | tests/testdata/npm/compare_globals/main.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/testdata/npm/compare_globals/main.ts b/tests/testdata/npm/compare_globals/main.ts index 6f7b9ef8e..5d082386f 100644 --- a/tests/testdata/npm/compare_globals/main.ts +++ b/tests/testdata/npm/compare_globals/main.ts @@ -37,12 +37,17 @@ console.log( ); globals.checkProcessGlobal(); -// In Deno, the window global is defined, but in Node it is not. +// In Deno, the window and self globals are defined, but in Node they are not. console.log("window" in globalThis); +console.log("self" in globalThis); console.log( Object.getOwnPropertyDescriptor(globalThis, "window") !== undefined, ); +console.log( + Object.getOwnPropertyDescriptor(globalThis, "self") !== undefined, +); globals.checkWindowGlobal(); +globals.checkSelfGlobal(); // "Non-managed" globals are shared between Node and Deno. (globalThis as any).foo = "bar"; |