diff options
author | Roman Reiss <me@silverwind.io> | 2015-05-29 19:28:01 +0200 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2015-06-11 20:22:51 +0200 |
commit | ff8202c6f475973c8674e61c794b77e1b072144b (patch) | |
tree | 9d5ba10768095c60881f88206dbb05f40a7c4560 /test/parallel/test-cluster-worker-kill.js | |
parent | 873297753642e77fb556d13a0e4bc228f34171bd (diff) | |
download | node-new-ff8202c6f475973c8674e61c794b77e1b072144b.tar.gz |
test: fix undeclared variable access
Fixes all cases of undeclared variable access as uncovered by the
no-undef rule of eslint.
PR-URL: https://github.com/nodejs/io.js/pull/1794
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/parallel/test-cluster-worker-kill.js')
-rw-r--r-- | test/parallel/test-cluster-worker-kill.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/parallel/test-cluster-worker-kill.js b/test/parallel/test-cluster-worker-kill.js index c73cf2dbd5..e12b466610 100644 --- a/test/parallel/test-cluster-worker-kill.js +++ b/test/parallel/test-cluster-worker-kill.js @@ -106,16 +106,12 @@ function checkResults(expected_results, results) { var actual = results[k], expected = expected_results[k]; - if (typeof expected === 'function') { - expected(r[k]); + var msg = (expected[1] || '') + + (' [expected: ' + expected[0] + ' / actual: ' + actual + ']'); + if (expected && expected.length) { + assert.equal(actual, expected[0], msg); } else { - var msg = (expected[1] || '') + - (' [expected: ' + expected[0] + ' / actual: ' + actual + ']'); - if (expected && expected.length) { - assert.equal(actual, expected[0], msg); - } else { - assert.equal(actual, expected, msg); - } + assert.equal(actual, expected, msg); } } } |