summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/compare_globals
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/npm/compare_globals')
-rw-r--r--cli/tests/testdata/npm/compare_globals/main.js2
-rw-r--r--cli/tests/testdata/npm/compare_globals/main.out5
-rw-r--r--cli/tests/testdata/npm/compare_globals/main.ts14
3 files changed, 19 insertions, 2 deletions
diff --git a/cli/tests/testdata/npm/compare_globals/main.js b/cli/tests/testdata/npm/compare_globals/main.js
deleted file mode 100644
index ce43e32b1..000000000
--- a/cli/tests/testdata/npm/compare_globals/main.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import * as globals from "npm:@denotest/globals";
-console.log(globals.global === globals.globalThis);
diff --git a/cli/tests/testdata/npm/compare_globals/main.out b/cli/tests/testdata/npm/compare_globals/main.out
index a1a5c0e8f..1b22fd318 100644
--- a/cli/tests/testdata/npm/compare_globals/main.out
+++ b/cli/tests/testdata/npm/compare_globals/main.out
@@ -1,3 +1,8 @@
Download http://localhost:4545/npm/registry/@denotest/globals
+Download http://localhost:4545/npm/registry/@types/node
Download http://localhost:4545/npm/registry/@denotest/globals/1.0.0.tgz
+Download http://localhost:4545/npm/registry/@types/node/node-18.8.2.tgz
+Check file:///[WILDCARD]/npm/compare_globals/main.ts
+Check file:///[WILDCARD]/std/node/module_all.ts
true
+[]
diff --git a/cli/tests/testdata/npm/compare_globals/main.ts b/cli/tests/testdata/npm/compare_globals/main.ts
new file mode 100644
index 000000000..5710d0bd5
--- /dev/null
+++ b/cli/tests/testdata/npm/compare_globals/main.ts
@@ -0,0 +1,14 @@
+/// <reference types="npm:@types/node" />
+
+import * as globals from "npm:@denotest/globals";
+console.log(globals.global === globals.globalThis);
+console.log(globals.process.execArgv);
+
+type AssertTrue<T extends true> = never;
+type _TestNoProcessGlobal = AssertTrue<
+ typeof globalThis extends { process: any } ? false : true
+>;
+type _TestHasNodeJsGlobal = NodeJS.Architecture;
+
+const controller = new AbortController();
+controller.abort("reason"); // in the NodeJS declaration it doesn't have a reason