test: make debugging of inspector-port-zero easier
If the process was killed, then the exit code will be null, in which case knowing the signal is really helpful. PR-URL: https://github.com/nodejs/node/pull/16685 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
52010553d3
commit
5c7b1ecbce
@ -34,7 +34,10 @@ function test(arg, port = '') {
|
||||
};
|
||||
proc.stdout.on('close', mustCall(() => onclose()));
|
||||
proc.stderr.on('close', mustCall(() => onclose()));
|
||||
proc.on('exit', mustCall((exitCode) => assert.strictEqual(exitCode, 0)));
|
||||
proc.on('exit', mustCall((exitCode, signal) => assert.strictEqual(
|
||||
exitCode,
|
||||
0,
|
||||
`exitCode: ${exitCode}, signal: ${signal}`)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user