mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
feat(cli): expose node global
everywhere
This commit is contained in:
parent
37cedefb4d
commit
2a8db23fd8
4 changed files with 11 additions and 0 deletions
|
@ -136,6 +136,7 @@ const windowOrWorkerGlobalScope = {
|
||||||
Crypto: core.propNonEnumerable(crypto.Crypto),
|
Crypto: core.propNonEnumerable(crypto.Crypto),
|
||||||
SubtleCrypto: core.propNonEnumerable(crypto.SubtleCrypto),
|
SubtleCrypto: core.propNonEnumerable(crypto.SubtleCrypto),
|
||||||
fetch: core.propWritable(fetch.fetch),
|
fetch: core.propWritable(fetch.fetch),
|
||||||
|
global: core.propWritable(globalThis),
|
||||||
EventSource: core.propWritable(eventSource.EventSource),
|
EventSource: core.propWritable(eventSource.EventSource),
|
||||||
performance: core.propWritable(performance.performance),
|
performance: core.propWritable(performance.performance),
|
||||||
process: core.propWritable(process),
|
process: core.propWritable(process),
|
||||||
|
|
9
tests/specs/run/globals/__test__.jsonc
Normal file
9
tests/specs/run/globals/__test__.jsonc
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"tests": {
|
||||||
|
"has_node_global": {
|
||||||
|
"args": "run has_node_global.js",
|
||||||
|
"exitCode": 0,
|
||||||
|
"output": "has_node_global.out"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
tests/specs/run/globals/has_node_global.js
Normal file
1
tests/specs/run/globals/has_node_global.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
globalThis === globalThis.global;
|
0
tests/specs/run/globals/has_node_global.out
Normal file
0
tests/specs/run/globals/has_node_global.out
Normal file
Loading…
Reference in a new issue