From a26aece4d98dcef75b7ff9856b97b05f752c23e0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 20 May 2018 18:40:49 -0700 Subject: [PATCH] test: use error code rather than message in test Use err.code checking instead of err.message checking in test-child-process-fork-closed-channel-segfault. --- .../parallel/test-child-process-fork-closed-channel-segfault.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } });