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; }