diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 7a5f3d4715a7f2..0cb55d42aa2999 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -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); @@ -52,8 +52,8 @@ typeErrorTests.forEach((test) => { if (test !== undefined) { fail(namespace.basename, 'foo', test); } - }); -}); + } +} // path.sep tests // windows