summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js')
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js
index daac83c66..b946bbd2a 100644
--- a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js
+++ b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js
@@ -2,6 +2,24 @@ exports.globalThis = globalThis;
exports.global = global;
exports.process = process;
-exports.withNodeGlobalThis = function (action) {
- action(globalThis);
+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