Skip to content

Commit

Permalink
test: replace forEach() with for ... of loop in test-global.js
Browse files Browse the repository at this point in the history
PR-URL: #49772
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
shizuka1308 authored and targos committed Nov 14, 2023
1 parent f70a59f commit 7c7be51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,7 +40,7 @@ builtinModules.forEach((moduleName) => {
// Continue regardless of error.
}
}
});
}

{
const expected = [
Expand Down

0 comments on commit 7c7be51

Please sign in to comment.