summaryrefslogtreecommitdiff
path: root/cli/tests/integration/run_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-01-25 21:13:40 +0100
committerGitHub <noreply@github.com>2023-01-25 21:13:40 +0100
commitc6c8c91a6e4b7a2b6eed02d3e2f5db25c124d9a0 (patch)
tree1fe8e9ab2175154d44e78d153dd760e56dc1c860 /cli/tests/integration/run_tests.rs
parentb5b4887c4a5fefdeb5592ebaadcc941281d0c4d5 (diff)
feat: embed import map in the config file (#17478)
This commit changes handling of config file to enable specifying "imports" and "scopes" objects effectively making the configuration file an import map. "imports" and "scopes" take precedence over "importMap" configuration, but have lower priority than "--importmap" CLI flag. Co-authored-by: David Sherret <dsherret@users.noreply.github.com> Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r--cli/tests/integration/run_tests.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index fd6e6588c..62bfe136f 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -164,6 +164,17 @@ itest!(_033_import_map {
output: "run/033_import_map.out",
});
+itest!(_033_import_map_in_config_file {
+ args: "run --reload --config=import_maps/config.json import_maps/test.ts",
+ output: "run/033_import_map_in_config_file.out",
+});
+
+itest!(_033_import_map_in_flag_has_precedence {
+ args: "run --quiet --reload --import-map=import_maps/import_map_invalid.json --config=import_maps/config.json import_maps/test.ts",
+ output: "run/033_import_map_in_flag_has_precedence.out",
+ exit_code: 1,
+});
+
itest!(_033_import_map_remote {
args:
"run --quiet --reload --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json --unstable import_maps/test_remote.ts",