diff options
author | cjihrig <cjihrig@gmail.com> | 2017-04-11 16:01:00 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-04-17 16:20:22 -0400 |
commit | 59c623086173cb28c887c5c54f213e067d6f8784 (patch) | |
tree | fafe5861dde46a6f8bc4daaec03736b75b43ce94 /test/parallel/test-child-process-constructor.js | |
parent | a9111f973801e88b4d27aa80af8fa17a901a1415 (diff) | |
download | android-node-v8-59c623086173cb28c887c5c54f213e067d6f8784.tar.gz android-node-v8-59c623086173cb28c887c5c54f213e067d6f8784.tar.bz2 android-node-v8-59c623086173cb28c887c5c54f213e067d6f8784.zip |
test: cleanup test-child-process-constructor.js
PR-URL: https://github.com/nodejs/node/pull/12348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-constructor.js')
-rw-r--r-- | test/parallel/test-child-process-constructor.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-child-process-constructor.js b/test/parallel/test-child-process-constructor.js index d33c7ae3ac..e39bdf867d 100644 --- a/test/parallel/test-child-process-constructor.js +++ b/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); |