diff options
Diffstat (limited to 'tests/registry/npm/@denotest/globals/1.0.0/index.js')
-rw-r--r-- | tests/registry/npm/@denotest/globals/1.0.0/index.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/registry/npm/@denotest/globals/1.0.0/index.js b/tests/registry/npm/@denotest/globals/1.0.0/index.js new file mode 100644 index 000000000..b946bbd2a --- /dev/null +++ b/tests/registry/npm/@denotest/globals/1.0.0/index.js @@ -0,0 +1,25 @@ +exports.globalThis = globalThis; +exports.global = global; +exports.process = process; + +exports.deleteSetTimeout = function () { + delete globalThis.setTimeout; +}; + +exports.getSetTimeout = function () { + return globalThis.setTimeout; +}; + +exports.checkProcessGlobal = function () { + console.log("process" in globalThis); + console.log(Object.getOwnPropertyDescriptor(globalThis, "process") !== undefined); +}; + +exports.checkWindowGlobal = function () { + console.log("window" in globalThis); + console.log(Object.getOwnPropertyDescriptor(globalThis, "window") !== undefined); +} + +exports.getFoo = function () { + return globalThis.foo; +}
\ No newline at end of file |