Skip to content

Commit

Permalink
test: fix test-net-* variable redeclarations
Browse files Browse the repository at this point in the history
PR-URL: #4989
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Klauke <[email protected]>
  • Loading branch information
Trott authored and rvagg committed Feb 8, 2016
1 parent e93b024 commit d619977
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-net-socket-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ var nonNumericDelays = ['100', true, false, undefined, null, '', {}, noop, []];
var badRangeDelays = [-0.001, -1, -Infinity, Infinity, NaN];
var validDelays = [0, 0.001, 1, 1e6];

for (var i = 0; i < nonNumericDelays.length; i++) {
for (let i = 0; i < nonNumericDelays.length; i++) {
assert.throws(function() {
s.setTimeout(nonNumericDelays[i], noop);
}, TypeError);
}

for (var i = 0; i < badRangeDelays.length; i++) {
for (let i = 0; i < badRangeDelays.length; i++) {
assert.throws(function() {
s.setTimeout(badRangeDelays[i], noop);
}, RangeError);
}

for (var i = 0; i < validDelays.length; i++) {
for (let i = 0; i < validDelays.length; i++) {
assert.doesNotThrow(function() {
s.setTimeout(validDelays[i], noop);
});
Expand Down

0 comments on commit d619977

Please sign in to comment.