GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: convert forEach to for in test-constant.js file · nodejs/node@a60572a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-constants.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-constants.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-constants.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ assert.ok(binding.os.errno);
1414
assert.ok(binding.fs);
1515
assert.ok(binding.crypto);
1616

17-
['os', 'fs', 'crypto'].forEach((l) => {
17+
const moduleNames = ['os', 'fs', 'crypto'];
18+
for (const l of moduleNames) {
1819
for (const k of Object.keys(binding[l])) {
1920
if (typeof binding[l][k] === 'object') { // errno and signals
2021
for (const j of Object.keys(binding[l][k])) {
@@ -25,6 +26,6 @@ assert.ok(binding.crypto);
2526
assert.strictEqual(binding[l][k], constants[k]);
2627
}
2728
}
28-
});
29+
}
2930

3031
assert.ok(Object.isFrozen(constants));

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.