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:
parent
097896bafe
commit
2f36cb4125
@ -93,7 +93,11 @@ if (process.argv[2] === 'child') {
|
|||||||
// ready to be disconnected
|
// ready to be disconnected
|
||||||
if (data === 'ready') {
|
if (data === 'ready') {
|
||||||
child.disconnect();
|
child.disconnect();
|
||||||
assert.throws(child.disconnect.bind(child), Error);
|
assert.throws(
|
||||||
|
child.disconnect.bind(child),
|
||||||
|
{
|
||||||
|
code: 'ERR_IPC_DISCONNECTED'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user