Skip to content

Commit

Permalink
test: make nodejsgh-2847 regression test stricter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Trott committed Nov 18, 2016
1 parent 38813c1 commit 35f4828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-child-process-fork-regr-gh-2847.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 35f4828

Please sign in to comment.