1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

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.
This commit is contained in:
Matt Mastracci 2023-03-22 12:00:07 -06:00 committed by GitHub
parent 1f635b1eac
commit 79fb3b1f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,12 @@ fn js_unit_tests() {
.expect("failed to spawn script"); .expect("failed to spawn script");
let status = deno.wait().expect("failed to wait for the child process"); 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()); assert!(status.success());
} }