Skip to content

Commit

Permalink
test: replace foreach with for
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescreen committed Nov 13, 2023
1 parent 5e3217c commit dfebfc4
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 dfebfc4

Please sign in to comment.