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 <rafael.nunu@hotmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
shizuka1308 authored and UlisesGascon committed Dec 11, 2023
1 parent 4b219b6 commit 7cacddf
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 7cacddf

Please sign in to comment.