Skip to content

Commit 30bff4a

Browse files
Nixxy25avivkeller
authored andcommitted
test: convert forEach to for in test-constant.js file
Signed-off-by: NIxxy25 <tellaoyinkansola25@gmail.com> PR-URL: #65271 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
1 parent c73d0b1 commit 30bff4a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/parallel/test-constants.js

Lines 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)