From d7c28c9243a36c2a42b3bf5ae982b21470d3118c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 24 Sep 2020 05:46:36 -0700 Subject: [PATCH] test,child_process: add tests for signalCode value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to this change, none of the child_process tests checked the signalCode property for a value other than null. Add a check to an existing test. PR-URL: https://github.com/nodejs/node/pull/35327 Reviewed-By: Anna Henningsen Reviewed-By: Gerhard Stöbich --- test/parallel/test-child-process-kill.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-child-process-kill.js b/test/parallel/test-child-process-kill.js index 00aab44dd1318d..1025c69ba1ac28 100644 --- a/test/parallel/test-child-process-kill.js +++ b/test/parallel/test-child-process-kill.js @@ -32,8 +32,10 @@ cat.stderr.on('end', common.mustCall()); cat.on('exit', common.mustCall((code, signal) => { assert.strictEqual(code, null); assert.strictEqual(signal, 'SIGTERM'); + assert.strictEqual(cat.signalCode, 'SIGTERM'); })); +assert.strictEqual(cat.signalCode, null); assert.strictEqual(cat.killed, false); cat.kill(); assert.strictEqual(cat.killed, true);