diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-12-08 11:50:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 11:50:09 -0500 |
commit | 91443bbc0b3e5420d8a0b3506f1b18a88d48560a (patch) | |
tree | 804e60461874a71af08760f3aa1809c782558ac0 /cli/tests/compile_tests.rs | |
parent | a6b5d05311f54d085a1e44f4a51717b4c0a4c74b (diff) |
fix(compile): ensure import map is used when specified in deno config file (#16990)
Closes #14246
Diffstat (limited to 'cli/tests/compile_tests.rs')
-rw-r--r-- | cli/tests/compile_tests.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/compile_tests.rs b/cli/tests/compile_tests.rs index 869a8780e..970ef5ee3 100644 --- a/cli/tests/compile_tests.rs +++ b/cli/tests/compile_tests.rs @@ -449,6 +449,40 @@ mod compile { } #[test] + fn standalone_import_map_config_file() { + let dir = TempDir::new(); + let exe = if cfg!(windows) { + dir.path().join("import_map.exe") + } else { + dir.path().join("import_map") + }; + let output = util::deno_cmd() + .current_dir(util::testdata_path()) + .arg("compile") + .arg("--unstable") + .arg("--allow-read") + .arg("--config") + .arg("compile/standalone_import_map_config.json") + .arg("--output") + .arg(&exe) + .arg("./compile/standalone_import_map.ts") + .stdout(std::process::Stdio::piped()) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + assert!(output.status.success()); + let output = Command::new(exe) + .stdout(std::process::Stdio::piped()) + .stderr(std::process::Stdio::piped()) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + assert!(output.status.success()); + } + + #[test] // https://github.com/denoland/deno/issues/12670 fn skip_rebundle() { let dir = TempDir::new(); |