diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-03-22 12:00:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 18:00:07 +0000 |
commit | 79fb3b1f352da85340a0f68ce90a64843393ed42 (patch) | |
tree | 99667ec7faa33a71da533ed9f1621e7abfc51d05 /cli/tests/integration/js_unit_tests.rs | |
parent | 1f635b1eac9ff04c4c7bf57067f78befd2f518bf (diff) |
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.
Diffstat (limited to 'cli/tests/integration/js_unit_tests.rs')
-rw-r--r-- | cli/tests/integration/js_unit_tests.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/tests/integration/js_unit_tests.rs b/cli/tests/integration/js_unit_tests.rs index 1f2ebf062..b4dc88a9f 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()); } |