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 <rafael.nunu@hotmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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

+2-2
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 (const moduleName of builtinModules) {
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
const expected = [

0 commit comments

Comments
 (0)