Skip to content

Commit

Permalink
test,child_process: add tests for signalCode value
Browse files Browse the repository at this point in the history
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 <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
  • Loading branch information
Trott authored and MylesBorins committed Sep 29, 2020
1 parent 1e1cb94 commit d7c28c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-child-process-kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit d7c28c9

Please sign in to comment.