Browse Source

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>
v2.3.1-release
Roman Reiss 10 years ago
parent
commit
ff8202c6f4
  1. 4
      test/parallel/test-cluster-worker-exit.js
  2. 4
      test/parallel/test-cluster-worker-kill.js
  3. 2
      test/pummel/test-net-timeout.js

4
test/parallel/test-cluster-worker-exit.js

@ -106,9 +106,6 @@ 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 + ']');
@ -118,7 +115,6 @@ function checkResults(expected_results, results) {
assert.equal(actual, expected, msg);
}
}
}
}
function alive(pid) {

4
test/parallel/test-cluster-worker-kill.js

@ -106,9 +106,6 @@ 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 + ']');
if (expected && expected.length) {
@ -117,7 +114,6 @@ function checkResults(expected_results, results) {
assert.equal(actual, expected, msg);
}
}
}
}
function alive(pid) {

2
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);

Loading…
Cancel
Save