Skip to content

Commit

Permalink
test: add more descriptive err message to assert
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
Josh-Broomfield authored and targos committed Oct 4, 2018
1 parent 8fe62f8 commit 44db98a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parallel/test-child-process-disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 44db98a

Please sign in to comment.