Skip to content

Commit 7cacddf

Browse files
shizuka1308UlisesGascon
authored andcommitted
test: replace forEach() with for ... of loop in test-global.js
PR-URL: #49772 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4b219b6 commit 7cacddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎test/parallel/test-global.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const assert = require('assert');
3030
const{ builtinModules }=require('module');
3131

3232
// Load all modules to actually cover most code parts.
33-
builtinModules.forEach((moduleName)=>{
33+
for(constmoduleNameofbuiltinModules){
3434
if(!moduleName.includes('/')){
3535
try{
3636
// This could throw for e.g., crypto if the binary is not compiled
@@ -40,7 +40,7 @@ builtinModules.forEach((moduleName) =>{
4040
// Continue regardless of error.
4141
}
4242
}
43-
});
43+
}
4444

4545
{
4646
constexpected=[

0 commit comments

Comments
(0)