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-exit.js | |
parent | 873297753642e77fb556d13a0e4bc228f34171bd (diff) | |
download | android-node-v8-ff8202c6f475973c8674e61c794b77e1b072144b.tar.gz android-node-v8-ff8202c6f475973c8674e61c794b77e1b072144b.tar.bz2 android-node-v8-ff8202c6f475973c8674e61c794b77e1b072144b.zip |
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-exit.js')
-rw-r--r-- | test/parallel/test-cluster-worker-exit.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js index 982b099cd1..3607a992a3 100644 --- a/test/parallel/test-cluster-worker-exit.js +++ b/test/parallel/test-cluster-worker-exit.js @@ -106,17 +106,13 @@ function checkResults(expected_results, results) { var actual = results[k], expected = expected_results[k]; - if (typeof expected === 'function') { - expected(r[k]); - } else { - var msg = (expected[1] || '') + - (' [expected: ' + expected[0] + ' / actual: ' + actual + ']'); + 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); - } + if (expected && expected.length) { + assert.equal(actual, expected[0], msg); + } else { + assert.equal(actual, expected, msg); } } } |