From c5bb83f50a916309fa16560c28555336961a94bd Mon Sep 17 00:00:00 2001 From: shizuka1308 Date: Fri, 22 Sep 2023 14:48:41 -0400 Subject: [PATCH] test: replace forEach() with for ... of loop in test-global.js --- test/parallel/test-global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index 0a8fecd240c8a1..d31b1d97744ff8 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -30,7 +30,7 @@ const assert = require('assert'); const { builtinModules } = require('module'); // Load all modules to actually cover most code parts. -builtinModules.forEach((moduleName) => { +for (const moduleName of builtinModules) { if (!moduleName.includes('/')) { try { // This could throw for e.g., crypto if the binary is not compiled @@ -40,7 +40,7 @@ builtinModules.forEach((moduleName) => { // Continue regardless of error. } } -}); +} { const expected = [