summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/compat
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/compat')
-rw-r--r--cli/tests/testdata/compat/existing_import_map.out3
-rw-r--r--cli/tests/testdata/compat/globals.out7
-rw-r--r--cli/tests/testdata/compat/globals.ts8
3 files changed, 17 insertions, 1 deletions
diff --git a/cli/tests/testdata/compat/existing_import_map.out b/cli/tests/testdata/compat/existing_import_map.out
index 0e319b115..cbff0cc51 100644
--- a/cli/tests/testdata/compat/existing_import_map.out
+++ b/cli/tests/testdata/compat/existing_import_map.out
@@ -2,4 +2,5 @@
Some Node built-ins were not added to the import map:
- "fs/promises" already exists and is mapped to "[WILDCARD]non_existent_file.js"
If you want to use Node built-ins provided by Deno remove listed specifiers from "imports" mapping in the import map file.
-error: Cannot resolve module [WILDCARD] \ No newline at end of file
+[WILDCARD]
+error: Cannot resolve module [WILDCARD]
diff --git a/cli/tests/testdata/compat/globals.out b/cli/tests/testdata/compat/globals.out
new file mode 100644
index 000000000..0bc09137b
--- /dev/null
+++ b/cli/tests/testdata/compat/globals.out
@@ -0,0 +1,7 @@
+[WILDCARD]
+process {
+[WILDCARD]
+}
+[Function: Buffer]
+[Function: setImmediate]
+[Function: clearTimeout]
diff --git a/cli/tests/testdata/compat/globals.ts b/cli/tests/testdata/compat/globals.ts
new file mode 100644
index 000000000..39a555cbf
--- /dev/null
+++ b/cli/tests/testdata/compat/globals.ts
@@ -0,0 +1,8 @@
+if (global != window) {
+ throw new Error("global is not equal to window");
+}
+
+console.log(process);
+console.log(Buffer);
+console.log(setImmediate);
+console.log(clearImmediate);