From be44f96a4e5520fda3126cbb8afa07aed9df026e Mon Sep 17 00:00:00 2001 From: Josh Broomfield Date: Thu, 27 Sep 2018 02:48:51 -0400 Subject: [PATCH 1/3] Added more descriptive error message to test's assert --- test/parallel/test-child-process-disconnect.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index 503ba906e7cf04..eaa7af94a952d8 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -93,7 +93,12 @@ if (process.argv[2] === 'child') { // ready to be disconnected if (data === 'ready') { child.disconnect(); - assert.throws(child.disconnect.bind(child), Error); + assert.throws( + child.disconnect.bind(child), + { + code: 'ERR_IPC_DISCONNECTED', + type: Error + }); return; } From c563cb6825f0a8eb725959dc2963dfb46bf76e71 Mon Sep 17 00:00:00 2001 From: Josh Broomfield Date: Thu, 27 Sep 2018 14:31:31 -0400 Subject: [PATCH 2/3] removed trailing space --- test/parallel/test-child-process-disconnect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index eaa7af94a952d8..d1358f43170a2a 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -94,7 +94,7 @@ if (process.argv[2] === 'child') { if (data === 'ready') { child.disconnect(); assert.throws( - child.disconnect.bind(child), + child.disconnect.bind(child), { code: 'ERR_IPC_DISCONNECTED', type: Error From 56d25eabd5f0025d63c48f576a63e86b3262c234 Mon Sep 17 00:00:00 2001 From: Josh Broomfield Date: Fri, 28 Sep 2018 01:51:20 -0400 Subject: [PATCH 3/3] removed unnecessary type property --- test/parallel/test-child-process-disconnect.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index d1358f43170a2a..e1b2c2de016d66 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -96,8 +96,7 @@ if (process.argv[2] === 'child') { assert.throws( child.disconnect.bind(child), { - code: 'ERR_IPC_DISCONNECTED', - type: Error + code: 'ERR_IPC_DISCONNECTED' }); return; }