Skip to content

Commit ea61261

Browse files
dygaboUlisesGascon
authored andcommitted
test: replace forEach with for [...] of
PR-URL: #50615 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
1 parent b48cf31 commit ea61261

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-fs-timestamp-parsing-error.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require('../common');
33
const assert = require('assert');
44
const fs = require('fs');
55

6-
[Infinity, -Infinity, NaN].forEach((input) => {
6+
for (const input of [Infinity, -Infinity, NaN]) {
77
assert.throws(
88
() => {
99
fs._toUnixTimestamp(input);
@@ -12,7 +12,7 @@ const fs = require('fs');
1212
code: 'ERR_INVALID_ARG_TYPE',
1313
name: 'TypeError'
1414
});
15-
});
15+
}
1616

1717
assert.throws(
1818
() => {
@@ -24,6 +24,6 @@ assert.throws(
2424
});
2525

2626
const okInputs = [1, -1, '1', '-1', Date.now()];
27-
okInputs.forEach((input) => {
27+
for (const input of okInputs) {
2828
fs._toUnixTimestamp(input);
29-
});
29+
}

0 commit comments

Comments
 (0)