on master help sign in
Add test
commit10c16f9e064d0ec3f522df76276c1f4f5eaf9b2e authormasad-frost <farismasad@gmail.com> dateWed 20 Jan 2021, 13:00 (6 years ago) parent0797e31
2 files changed+11−2
test_files/global_bug.js+7−2 test_files/global_require.js+4
test_files/global_bug.js+7−2
@@ -1,4 +1,5 @@
1−console.log([] instanceof global.Array);
1+console.assert([] instanceof global.Array);
2+console.assert([] instanceof Array);
23console.assert(process);
34console.assert(URL);
45console.assert(URLSearchParams);
@@ -9,4 +10,8 @@ console.assert(setImmediate);
910console.assert(setInterval);
1011console.assert(setTimeout);
1112console.assert(Buffer);
12−console.assert(globalThis === global);
13+console.assert(globalThis === global);
14+
15+const { Object: importedObject, global: importedGlobal} = require('./global_require')
16+console.assert(importedObject === Object);
17+console.assert(global === importedGlobal)
test_files/global_require.jsnew file+4
@@ -0,0 +1,4 @@
1+module.exports = {
2+ global,
3+ Object,
4+}