Skip to content

Commit f23a7cc

Browse files
author
shizuka1308
committed
replace forEach() with for ... of loop in test-global.js for enhanced code readability and maintainability.
1 parent e329a11 commit f23a7cc

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)