From dfebfc452ac1130dd96052c0d81d4677e048d8a9 Mon Sep 17 00:00:00 2001 From: Markus Muschol Date: Tue, 7 Nov 2023 16:08:50 +0100 Subject: [PATCH] test: replace foreach with for --- test/parallel/test-path.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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