diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2022-08-29 14:24:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-29 14:24:10 -0400 |
| commit | c3e48cba184f2f8aaf3d30196b674c8a7dd8449b (patch) | |
| tree | 4001dc9a30abbcf370971931891c0cf59aba4a2d /cli/tests/integration/compile_tests.rs | |
| parent | b62ef4d37bc1207abb2daed5e2568eb581f07aa2 (diff) | |
fix(compile): panic when running with a populated dep analysis cache (#15672)
Closes #15612
Diffstat (limited to 'cli/tests/integration/compile_tests.rs')
| -rw-r--r-- | cli/tests/integration/compile_tests.rs | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index a3f2e8697..5c9a7f074 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -13,27 +13,30 @@ fn compile() { } else { dir.path().join("welcome") }; - let output = util::deno_cmd() - .current_dir(util::root_path()) - .arg("compile") - .arg("--unstable") - .arg("--output") - .arg(&exe) - .arg("./test_util/std/examples/welcome.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()) - .spawn() - .unwrap() - .wait_with_output() - .unwrap(); - assert!(output.status.success()); - assert_eq!(output.stdout, "Welcome to Deno!\n".as_bytes()); + // try this twice to ensure it works with the cache + for _ in 0..2 { + let output = util::deno_cmd_with_deno_dir(&dir) + .current_dir(util::root_path()) + .arg("compile") + .arg("--unstable") + .arg("--output") + .arg(&exe) + .arg("./test_util/std/examples/welcome.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()) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + assert!(output.status.success()); + assert_eq!(output.stdout, "Welcome to Deno!\n".as_bytes()); + } } #[test] |
