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:
parent
1f635b1eac
commit
79fb3b1f35
1 changed files with 7 additions and 1 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue