diff options
author | haturau <135221985+haturatu@users.noreply.github.com> | 2024-11-20 01:20:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 01:20:47 +0900 |
commit | 85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch) | |
tree | face0aecaac53e93ce2f23b53c48859bcf1a36ec /tests/specs/npm/compare_globals | |
parent | 67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff) | |
parent | 186b52731c6bb326c4d32905c5e732d082e83465 (diff) |
Merge branch 'denoland:main' into main
Diffstat (limited to 'tests/specs/npm/compare_globals')
-rw-r--r-- | tests/specs/npm/compare_globals/__test__.jsonc | 4 | ||||
-rw-r--r-- | tests/specs/npm/compare_globals/main.out (renamed from tests/specs/npm/compare_globals/compare_globals/main.out) | 7 | ||||
-rw-r--r-- | tests/specs/npm/compare_globals/main.ts (renamed from tests/specs/npm/compare_globals/compare_globals/main.ts) | 11 |
3 files changed, 15 insertions, 7 deletions
diff --git a/tests/specs/npm/compare_globals/__test__.jsonc b/tests/specs/npm/compare_globals/__test__.jsonc index e096ddeb2..96458306a 100644 --- a/tests/specs/npm/compare_globals/__test__.jsonc +++ b/tests/specs/npm/compare_globals/__test__.jsonc @@ -1,4 +1,4 @@ { - "args": "run --allow-read --check=all compare_globals/main.ts", - "output": "compare_globals/main.out" + "args": "run --allow-read --check=all main.ts", + "output": "main.out" } diff --git a/tests/specs/npm/compare_globals/compare_globals/main.out b/tests/specs/npm/compare_globals/main.out index a1b0a566d..290e9c3b2 100644 --- a/tests/specs/npm/compare_globals/compare_globals/main.out +++ b/tests/specs/npm/compare_globals/main.out @@ -1,17 +1,18 @@ [UNORDERED_START] -Download http://localhost:4260/@types/node +Download http://localhost:4260/@types%2fnode Download http://localhost:4260/undici-types -Download http://localhost:4260/@denotest/globals +Download http://localhost:4260/@denotest%2fglobals [UNORDERED_END] [UNORDERED_START] Download http://localhost:4260/@denotest/globals/1.0.0.tgz Download http://localhost:4260/@types/node/node-22.5.4.tgz Download http://localhost:4260/undici-types/undici-types-6.19.8.tgz [UNORDERED_END] -Check file:///[WILDCARD]/compare_globals/main.ts +Check file:///[WILDCARD]/main.ts true true [] +process equals process true setTimeout 1 false setTimeout 2 function setTimeout 3 function diff --git a/tests/specs/npm/compare_globals/compare_globals/main.ts b/tests/specs/npm/compare_globals/main.ts index 9482798d8..308ce9b23 100644 --- a/tests/specs/npm/compare_globals/compare_globals/main.ts +++ b/tests/specs/npm/compare_globals/main.ts @@ -5,10 +5,17 @@ console.log(globals.global === globals.globalThis); // @ts-expect-error even though these are the same object, they have different types console.log(globals.globalThis === globalThis); console.log(globals.process.execArgv); +console.log("process equals process", process === globals.process); type AssertTrue<T extends true> = never; -type _TestNoProcessGlobal = AssertTrue< - typeof globalThis extends { process: any } ? false : true +type _TestHasProcessGlobal = AssertTrue< + typeof globalThis extends { process: any } ? true : false +>; +type _TestProcessGlobalVersion = AssertTrue< + typeof process.versions.node extends string ? true : false +>; +type _TestNoBufferGlogal = AssertTrue< + typeof globalThis extends { Buffer: any } ? false : true >; type _TestHasNodeJsGlobal = NodeJS.Architecture; |