test: add more descriptive err message to assert

PR-URL: https://github.com/nodejs/node/pull/23118
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Josh Broomfield 2018-09-27 02:48:51 -04:00 committed by Daniel Bevenius
parent 097896bafe
commit 2f36cb4125

View File

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