From 5c7b1ecbceeb32d947bea31c1256b1a9a42b8cba Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Thu, 2 Nov 2017 10:56:27 +0000 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung Reviewed-By: Eugene Ostroukhov Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca --- test/sequential/test-inspector-port-zero.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/sequential/test-inspector-port-zero.js b/test/sequential/test-inspector-port-zero.js index a3eb08e5fb7a64..b7eb13ba13a68a 100644 --- a/test/sequential/test-inspector-port-zero.js +++ b/test/sequential/test-inspector-port-zero.js @@ -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}`))); } }