From 35f48285c37d1306a1a6a80b05387e58695c8dcf Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 18 Nov 2016 11:46:12 -0800 Subject: [PATCH] test: make gh-2847 regression test stricter Throw an error if either `err.message` or `err.code` is wrong. Previously, it was only throwing an error if one or the other was happening. --- test/parallel/test-child-process-fork-regr-gh-2847.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-child-process-fork-regr-gh-2847.js b/test/parallel/test-child-process-fork-regr-gh-2847.js index d985b8b4acaf19..20d765008a208f 100644 --- a/test/parallel/test-child-process-fork-regr-gh-2847.js +++ b/test/parallel/test-child-process-fork-regr-gh-2847.js @@ -56,8 +56,8 @@ var server = net.createServer(function(s) { // Ignore errors when sending the second handle because the worker // may already have exited. if (err) { - if ((err.message !== 'channel closed') && - (err.code !== 'ECONNREFUSED')) { + if ((err.message !== 'channel closed') || + (err.code !== 'ECONNREFUSED')) { throw err; } }