diff --git a/test/parallel/test-child-process-fork-closed-channel-segfault.js b/test/parallel/test-child-process-fork-closed-channel-segfault.js index 87b599c7bb29f2..14cb4b8fd97ae9 100644 --- a/test/parallel/test-child-process-fork-closed-channel-segfault.js +++ b/test/parallel/test-child-process-fork-closed-channel-segfault.js @@ -66,7 +66,7 @@ const server = net send(function(err) { // Ignore errors when sending the second handle because the worker // may already have exited. - if (err && err.message !== 'Channel closed') { + if (err && err.code !== 'ERR_IPC_CHANNEL_CLOSED') { throw err; } });