summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/033_import_map_remote.out5
-rw-r--r--cli/tests/import_maps/import_map_remote.json9
-rw-r--r--cli/tests/import_maps/test_remote.ts5
-rw-r--r--cli/tests/integration_tests.rs7
4 files changed, 26 insertions, 0 deletions
diff --git a/cli/tests/033_import_map_remote.out b/cli/tests/033_import_map_remote.out
new file mode 100644
index 000000000..804fa0d57
--- /dev/null
+++ b/cli/tests/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/cli/tests/import_maps/import_map_remote.json b/cli/tests/import_maps/import_map_remote.json
new file mode 100644
index 000000000..51f90f69c
--- /dev/null
+++ b/cli/tests/import_maps/import_map_remote.json
@@ -0,0 +1,9 @@
+{
+ "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"
+ }
+}
diff --git a/cli/tests/import_maps/test_remote.ts b/cli/tests/import_maps/test_remote.ts
new file mode 100644
index 000000000..206bdbd5f
--- /dev/null
+++ b/cli/tests/import_maps/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/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index a25a51b20..988372b17 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2475,6 +2475,13 @@ console.log("finish");
output: "033_import_map.out",
});
+ itest!(_033_import_map_remote {
+ args:
+ "run --quiet --reload --import-map=http://127.0.0.1:4545/cli/tests/import_maps/import_map_remote.json --unstable import_maps/test_remote.ts",
+ output: "033_import_map_remote.out",
+ http_server: true,
+ });
+
itest!(_034_onload {
args: "run --quiet --reload 034_onload/main.ts",
output: "034_onload.out",