Skip to content

Commit 44db98a

Browse files
Josh-Broomfieldtargos
authored andcommitted
test: add more descriptive err message to assert
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>
1 parent 8fe62f8 commit 44db98a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/parallel/test-child-process-disconnect.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ if (process.argv[2] === 'child') {
9393
// ready to be disconnected
9494
if (data === 'ready') {
9595
child.disconnect();
96-
assert.throws(child.disconnect.bind(child), Error);
96+
assert.throws(
97+
child.disconnect.bind(child),
98+
{
99+
code: 'ERR_IPC_DISCONNECTED'
100+
});
97101
return;
98102
}
99103

0 commit comments

Comments
 (0)