summaryrefslogtreecommitdiff
path: root/tests/specs/run/_033_import_map_remote
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/run/_033_import_map_remote')
-rw-r--r--tests/specs/run/_033_import_map_remote/033_import_map_remote.out5
-rw-r--r--tests/specs/run/_033_import_map_remote/__test__.jsonc4
-rw-r--r--tests/specs/run/_033_import_map_remote/import_map_remote.json10
-rw-r--r--tests/specs/run/_033_import_map_remote/lodash/lodash.ts1
-rw-r--r--tests/specs/run/_033_import_map_remote/lodash/other_file.ts1
-rw-r--r--tests/specs/run/_033_import_map_remote/moment/moment.ts1
-rw-r--r--tests/specs/run/_033_import_map_remote/moment/other_file.ts1
-rw-r--r--tests/specs/run/_033_import_map_remote/print_hello.ts3
-rw-r--r--tests/specs/run/_033_import_map_remote/test_remote.ts5
-rw-r--r--tests/specs/run/_033_import_map_remote/vue.ts1
10 files changed, 32 insertions, 0 deletions
diff --git a/tests/specs/run/_033_import_map_remote/033_import_map_remote.out b/tests/specs/run/_033_import_map_remote/033_import_map_remote.out
new file mode 100644
index 000000000..804fa0d57
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/033_import_map_remote.out
@@ -0,0 +1,5 @@
+Hello from remapped moment!
+Hello from remapped moment dir!
+Hello from remapped lodash!
+Hello from remapped lodash dir!
+Hello from remapped Vue!
diff --git a/tests/specs/run/_033_import_map_remote/__test__.jsonc b/tests/specs/run/_033_import_map_remote/__test__.jsonc
new file mode 100644
index 000000000..20c848d49
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "run --quiet --reload --allow-import --import-map=import_map_remote.json test_remote.ts",
+ "output": "033_import_map_remote.out"
+}
diff --git a/tests/specs/run/_033_import_map_remote/import_map_remote.json b/tests/specs/run/_033_import_map_remote/import_map_remote.json
new file mode 100644
index 000000000..190fc4f55
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/import_map_remote.json
@@ -0,0 +1,10 @@
+{
+ "imports": {
+ "moment": "./moment/moment.ts",
+ "moment/": "./moment/",
+ "lodash": "./lodash/lodash.ts",
+ "lodash/": "./lodash/",
+ "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts",
+ "print_hello": "./print_hello.ts"
+ }
+}
diff --git a/tests/specs/run/_033_import_map_remote/lodash/lodash.ts b/tests/specs/run/_033_import_map_remote/lodash/lodash.ts
new file mode 100644
index 000000000..2ec04ed3c
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/lodash/lodash.ts
@@ -0,0 +1 @@
+console.log("Hello from remapped lodash!");
diff --git a/tests/specs/run/_033_import_map_remote/lodash/other_file.ts b/tests/specs/run/_033_import_map_remote/lodash/other_file.ts
new file mode 100644
index 000000000..714adae3f
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/lodash/other_file.ts
@@ -0,0 +1 @@
+console.log("Hello from remapped lodash dir!");
diff --git a/tests/specs/run/_033_import_map_remote/moment/moment.ts b/tests/specs/run/_033_import_map_remote/moment/moment.ts
new file mode 100644
index 000000000..2b54a431e
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/moment/moment.ts
@@ -0,0 +1 @@
+console.log("Hello from remapped moment!");
diff --git a/tests/specs/run/_033_import_map_remote/moment/other_file.ts b/tests/specs/run/_033_import_map_remote/moment/other_file.ts
new file mode 100644
index 000000000..24f3a0226
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/moment/other_file.ts
@@ -0,0 +1 @@
+console.log("Hello from remapped moment dir!");
diff --git a/tests/specs/run/_033_import_map_remote/print_hello.ts b/tests/specs/run/_033_import_map_remote/print_hello.ts
new file mode 100644
index 000000000..794257390
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/print_hello.ts
@@ -0,0 +1,3 @@
+export function printHello() {
+ console.log("Hello, world!");
+}
diff --git a/tests/specs/run/_033_import_map_remote/test_remote.ts b/tests/specs/run/_033_import_map_remote/test_remote.ts
new file mode 100644
index 000000000..206bdbd5f
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/test_remote.ts
@@ -0,0 +1,5 @@
+import "moment";
+import "moment/other_file.ts";
+import "lodash";
+import "lodash/other_file.ts";
+import "https://www.unpkg.com/vue/dist/vue.runtime.esm.js";
diff --git a/tests/specs/run/_033_import_map_remote/vue.ts b/tests/specs/run/_033_import_map_remote/vue.ts
new file mode 100644
index 000000000..76dbe1917
--- /dev/null
+++ b/tests/specs/run/_033_import_map_remote/vue.ts
@@ -0,0 +1 @@
+console.log("Hello from remapped Vue!");