summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-stdio.js
diff options
context:
space:
mode:
authorMithun Sasidharan <mithunsasidharan89@gmail.com>2017-12-06 14:07:52 +0530
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-08 16:21:47 -0500
commitd8c896cac5b3e31cbffb3da2c657dd59c83fbfeb (patch)
tree409f2e816a39e63476cab6125a82d26ada80d645 /test/parallel/test-child-process-stdio.js
parenteae0c05697121aaae4b097f34d30a259c8591af1 (diff)
downloadandroid-node-v8-d8c896cac5b3e31cbffb3da2c657dd59c83fbfeb.tar.gz
android-node-v8-d8c896cac5b3e31cbffb3da2c657dd59c83fbfeb.tar.bz2
android-node-v8-d8c896cac5b3e31cbffb3da2c657dd59c83fbfeb.zip
test: use common.expectsError in tests
PR-URL: https://github.com/nodejs/node/pull/17484 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'test/parallel/test-child-process-stdio.js')
-rw-r--r--test/parallel/test-child-process-stdio.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-child-process-stdio.js b/test/parallel/test-child-process-stdio.js
index f1d18d437f..8624a13e1b 100644
--- a/test/parallel/test-child-process-stdio.js
+++ b/test/parallel/test-child-process-stdio.js
@@ -40,6 +40,6 @@ options = { stdio: 'ignore' };
child = spawnSync('cat', [], options);
assert.deepStrictEqual(options, { stdio: 'ignore' });
-assert.throws(() => {
+common.expectsError(() => {
common.spawnPwd({ stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'ipc'] });
-}, common.expectsError({ code: 'ERR_IPC_ONE_PIPE', type: Error }));
+}, { code: 'ERR_IPC_ONE_PIPE', type: Error });