Skip to content

Commit

Permalink
test: replace foreach with for
Browse files Browse the repository at this point in the history
PR-URL: #50599
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
bluescreen authored Nov 15, 2023
1 parent 1d8483e commit ff879cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function fail(fn) {
}, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' });
}

typeErrorTests.forEach((test) => {
[path.posix, path.win32].forEach((namespace) => {
for (const test of typeErrorTests) {
for (const namespace of [path.posix, path.win32]) {
fail(namespace.join, test);
fail(namespace.resolve, test);
fail(namespace.normalize, test);
Expand All @@ -52,8 +52,8 @@ typeErrorTests.forEach((test) => {
if (test !== undefined) {
fail(namespace.basename, 'foo', test);
}
});
});
}
}

// path.sep tests
// windows
Expand Down

0 comments on commit ff879cd

Please sign in to comment.