diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js index 982b099cd1cfe1..3607a992a33dff 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); } } } diff --git a/test/parallel/test-cluster-worker-kill.js b/test/parallel/test-cluster-worker-kill.js index c73cf2dbd5216e..e12b466610171a 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); } } } diff --git a/test/pummel/test-net-timeout.js b/test/pummel/test-net-timeout.js index 347e3a4344d37b..25544a6d5f5989 100644 --- a/test/pummel/test-net-timeout.js +++ b/test/pummel/test-net-timeout.js @@ -79,7 +79,7 @@ process.on('exit', function() { assert.ok(starttime != null); assert.ok(timeouttime != null); - diff = timeouttime - starttime; + var diff = timeouttime - starttime; console.log('diff = ' + diff); assert.ok(timeout < diff);