From 4f0ab76b6c29da74b29125a3ec83bb06e77c2aad 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use err.code checking instead of err.message checking in test-child-process-fork-closed-channel-segfault. PR-URL: https://github.com/nodejs/node/pull/20859 Reviewed-By: Daniel Bevenius Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Anna Henningsen --- .../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; } });