summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-constructor.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-02-10 12:08:49 -0800
committerJames M Snell <jasnell@gmail.com>2017-04-27 15:44:14 -0700
commit76327613aff38f53c017eb26b2209fb1ca2b81b9 (patch)
tree156f42a6147e165d5082e3d9606e73c07910cd1c /test/parallel/test-child-process-constructor.js
parentf0b702555aacc814da28a018277d56e5f79f10d1 (diff)
downloadandroid-node-v8-76327613aff38f53c017eb26b2209fb1ca2b81b9.tar.gz
android-node-v8-76327613aff38f53c017eb26b2209fb1ca2b81b9.tar.bz2
android-node-v8-76327613aff38f53c017eb26b2209fb1ca2b81b9.zip
errors, child_process: migrate to using internal/errors
PR-URL: https://github.com/nodejs/node/pull/11300 Ref: https://github.com/nodejs/node/issues/11273 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'test/parallel/test-child-process-constructor.js')
-rw-r--r--test/parallel/test-child-process-constructor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-child-process-constructor.js b/test/parallel/test-child-process-constructor.js
index 7e86ad198f..c495f1895d 100644
--- a/test/parallel/test-child-process-constructor.js
+++ b/test/parallel/test-child-process-constructor.js
@@ -1,6 +1,6 @@
'use strict';
-require('../common');
+const common = require('../common');
const assert = require('assert');
const { ChildProcess } = require('child_process');
assert.strictEqual(typeof ChildProcess, 'function');
@@ -64,6 +64,6 @@ assert(Number.isInteger(child.pid));
// try killing with invalid signal
assert.throws(() => {
child.kill('foo');
-}, /^Error: Unknown signal: foo$/);
+}, common.expectsError({ code: 'ERR_UNKNOWN_SIGNAL' }));
assert.strictEqual(child.kill(), true);