Skip to content

Commit d7c28c9

Browse files
TrottMylesBorins
authored andcommitted
test,child_process: add tests for signalCode value
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: #35327 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
1 parent 1e1cb94 commit d7c28c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-child-process-kill.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ cat.stderr.on('end', common.mustCall());
3232
cat.on('exit', common.mustCall((code, signal) => {
3333
assert.strictEqual(code, null);
3434
assert.strictEqual(signal, 'SIGTERM');
35+
assert.strictEqual(cat.signalCode, 'SIGTERM');
3536
}));
3637

38+
assert.strictEqual(cat.signalCode, null);
3739
assert.strictEqual(cat.killed, false);
3840
cat.kill();
3941
assert.strictEqual(cat.killed, true);

0 commit comments

Comments
 (0)