0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-11 14:47:26 -04:00
deno/tests/registry/npm/@denotest/globals/1.0.0/index.js
2024-07-22 22:47:58 +02:00

30 lines
797 B
JavaScript

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.checkSelfGlobal = function () {
console.log("self" in globalThis);
console.log(Object.getOwnPropertyDescriptor(globalThis, "self") !== undefined);
}
exports.getFoo = function () {
return globalThis.foo;
}