From e03dce2150c2f6d0b261fcb972c05ce69eb9d1d3 Mon Sep 17 00:00:00 2001 From: Josh Broomfield Date: Thu, 27 Sep 2018 02:48:51 -0400 Subject: [PATCH] test: add more descriptive err message to assert PR-URL: https://github.com/nodejs/node/pull/23118 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott --- test/parallel/test-child-process-disconnect.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index 503ba906e7cf04..e1b2c2de016d66 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -93,7 +93,11 @@ 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' + }); return; }