diff options
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 4411ff0c3..c789a3389 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -466,22 +466,21 @@ itest!(_082_prepare_stack_trace_throw { #[test] fn _083_legacy_external_source_map() { let _g = util::http_server(); - let deno_dir = TempDir::new().expect("tempdir fail"); + let deno_dir = TempDir::new().unwrap(); let module_url = url::Url::parse("http://localhost:4545/083_legacy_external_source_map.ts") .unwrap(); // Write a faulty old external source map. let faulty_map_path = deno_dir.path().join("gen/http/localhost_PORT4545/9576bd5febd0587c5c4d88d57cb3ac8ebf2600c529142abe3baa9a751d20c334.js.map"); - std::fs::create_dir_all(faulty_map_path.parent().unwrap()) - .expect("Failed to create faulty source map dir."); - std::fs::write(faulty_map_path, "{\"version\":3,\"file\":\"\",\"sourceRoot\":\"\",\"sources\":[\"http://localhost:4545/083_legacy_external_source_map.ts\"],\"names\":[],\"mappings\":\";AAAA,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC\"}").expect("Failed to write faulty source map."); + std::fs::create_dir_all(faulty_map_path.parent().unwrap()).unwrap(); + std::fs::write(faulty_map_path, "{\"version\":3,\"file\":\"\",\"sourceRoot\":\"\",\"sources\":[\"http://localhost:4545/083_legacy_external_source_map.ts\"],\"names\":[],\"mappings\":\";AAAA,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC\"}").unwrap(); let output = Command::new(util::deno_exe_path()) .env("DENO_DIR", deno_dir.path()) .current_dir(util::testdata_path()) .arg("run") .arg(module_url.to_string()) .output() - .expect("Failed to spawn script"); + .unwrap(); // Before https://github.com/denoland/deno/issues/6965 was fixed, the faulty // old external source map would cause a panic while formatting the error // and the exit code would be 101. The external source map should be ignored @@ -2386,7 +2385,7 @@ fn issue12453() { /// Regression test for https://github.com/denoland/deno/issues/12740. #[test] fn issue12740() { - let mod_dir = TempDir::new().expect("tempdir fail"); + let mod_dir = TempDir::new().unwrap(); let mod1_path = mod_dir.path().join("mod1.ts"); let mod2_path = mod_dir.path().join("mod2.ts"); let mut deno_cmd = util::deno_cmd(); @@ -2420,7 +2419,7 @@ fn issue12740() { /// Regression test for https://github.com/denoland/deno/issues/12807. #[test] fn issue12807() { - let mod_dir = TempDir::new().expect("tempdir fail"); + let mod_dir = TempDir::new().unwrap(); let mod1_path = mod_dir.path().join("mod1.ts"); let mod2_path = mod_dir.path().join("mod2.ts"); let mut deno_cmd = util::deno_cmd(); |