From 6fce23c54ec619168eee096fc7bf801d0cec0cb6 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 8 Aug 2024 11:41:30 +0200 Subject: perf: skip saving to emit cache after first failure (#24896) --- tests/integration/run_tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/integration/run_tests.rs') diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index 9252de2e7..44199c631 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -5342,3 +5342,20 @@ async fn listen_tls_alpn_fail() { let status = child.wait().unwrap(); assert!(status.success()); } + +// Couldn't get the directory readonly on windows on the CI +// so gave up because this being tested on unix is good enough +#[cfg(unix)] +#[test] +fn emit_failed_readonly_file_system() { + let context = TestContextBuilder::default().use_temp_cwd().build(); + context.deno_dir().path().canonicalize().make_dir_readonly(); + let temp_dir = context.temp_dir().path().canonicalize(); + temp_dir.join("main.ts").write("import './other.ts';"); + temp_dir.join("other.ts").write("console.log('hi');"); + let output = context + .new_command() + .args("run --log-level=debug main.ts") + .run(); + output.assert_matches_text("[WILDCARD]Error saving emit data ([WILDLINE]main.ts)[WILDCARD]Skipped emit cache save of [WILDLINE]other.ts[WILDCARD]hi[WILDCARD]"); +} -- cgit v1.2.3