Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: fix test-net-* variable redeclarations
  • Loading branch information
Trott committed Jan 31, 2016
commit 3e8a495d35f3f676a5d7946e911e678cf1e6b3d6
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