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 authored and Michaël Zasso committed 2018-10-04 08:21:50 +02:00
1 parent 8fe62f8d38
commit 44db98a7b6
1 file changed
+5 -1
@@ -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;
}