diff options
author | Luigi Pinca <luigipinca@gmail.com> | 2020-04-08 19:58:03 +0300 |
---|---|---|
committer | Luigi Pinca <luigipinca@gmail.com> | 2020-05-16 07:42:16 +0300 |
commit | b533fb3508009e5f567cc776daba8fbf665386a6 (patch) | |
tree | 4b7bbfdc2feeee93b855b01abd2e56f499b70d0a /test/common/index.js | |
parent | 1cb80d1e0590eeb3daf495bddfcf5237a99aa9b7 (diff) |
tools: enable no-else-return lint rule
Refs: https://github.com/nodejs/node/pull/32644
Refs: https://github.com/nodejs/node/pull/32662
PR-URL: https://github.com/nodejs/node/pull/32667
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/common/index.js')
-rw-r--r-- | test/common/index.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/common/index.js b/test/common/index.js index a7528749926..6343425858d 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -309,10 +309,9 @@ function runCallChecks(exitCode) { if ('minimum' in context) { context.messageSegment = `at least ${context.minimum}`; return context.actual < context.minimum; - } else { - context.messageSegment = `exactly ${context.exact}`; - return context.actual !== context.exact; } + context.messageSegment = `exactly ${context.exact}`; + return context.actual !== context.exact; }); failed.forEach(function(context) { @@ -465,9 +464,8 @@ function nodeProcessAborted(exitCode, signal) { // the expected exit codes or signals. if (signal !== null) { return expectedSignals.includes(signal); - } else { - return expectedExitCodes.includes(exitCode); } + return expectedExitCodes.includes(exitCode); } function isAlive(pid) { |