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:
Gibson Fahnestock 2017-11-02 10:56:27 +00:00
parent 52010553d3
commit 5c7b1ecbce
No known key found for this signature in database
GPG Key ID: B01FBB92821C587A

View File

@ -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}`)));
}
}