Skip to content

Commit 2f36cb4

Browse files
Josh-Broomfielddanbev
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 097896b commit 2f36cb4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
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)