From 0e8275b6106d2419f4436eb5e0be07dd884c0473 Mon Sep 17 00:00:00 2001 From: Markus Muschol Date: Wed, 15 Nov 2023 12:49:14 +0100 Subject: [PATCH] test: replace foreach with for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/50599 Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen --- 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