From 79fb3b1f352da85340a0f68ce90a64843393ed42 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Wed, 22 Mar 2023 12:00:07 -0600 Subject: [PATCH] chore(cli): ensure no signal on test exit (#18354) If deno crashes on exit, we get a failure on the exit code (None instead of Some(0) but we never see the signal. --- cli/tests/integration/js_unit_tests.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/tests/integration/js_unit_tests.rs b/cli/tests/integration/js_unit_tests.rs index 1f2ebf0622..b4dc88a9f2 100644 --- a/cli/tests/integration/js_unit_tests.rs +++ b/cli/tests/integration/js_unit_tests.rs @@ -36,6 +36,12 @@ fn js_unit_tests() { .expect("failed to spawn script"); let status = deno.wait().expect("failed to wait for the child process"); - assert_eq!(Some(0), status.code()); + #[cfg(unix)] + assert_eq!( + std::os::unix::process::ExitStatusExt::signal(&status), + None, + "Deno should not have died with a signal" + ); + assert_eq!(Some(0), status.code(), "Deno should have exited cleanly"); assert!(status.success()); }