Permalink
Browse files

test: cleanup test-child-process-constructor.js

PR-URL: #12348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information...
cjihrig committed Apr 11, 2017
1 parent a9111f9 commit 59c623086173cb28c887c5c54f213e067d6f8784
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/parallel/test-child-process-constructor.js
@@ -2,8 +2,7 @@
require('../common');
const assert = require('assert');
const child_process = require('child_process');
const ChildProcess = child_process.ChildProcess;
const { ChildProcess } = require('child_process');
assert.strictEqual(typeof ChildProcess, 'function');
// test that we can call spawn
@@ -16,10 +15,11 @@ child.spawn({
});
assert.strictEqual(child.hasOwnProperty('pid'), true);
assert(Number.isInteger(child.pid));
// try killing with invalid signal
assert.throws(function() {
assert.throws(() => {
child.kill('foo');
}, /Unknown signal: foo/);
}, /^Error: Unknown signal: foo$/);
assert.strictEqual(child.kill(), true);

0 comments on commit 59c6230

Please sign in to comment.