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 <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
bluescreen authored and UlisesGascon committed Dec 11, 2023
1 parent 5e6f9ed commit 37f3ebc
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 37f3ebc

Please sign in to comment.