Skip to content

Commit 9d83651

Browse files
niyashiyastargos
authored andcommitted
test: replace forEach with for..of in test-parse-args.mjs
PR-URL: #49824 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent c99e51e commit 9d83651

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-parse-args.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ const candidateGreedyOptions = [
451451
'--foo',
452452
];
453453

454-
candidateGreedyOptions.forEach((value) => {
454+
for (const value of candidateGreedyOptions) {
455455
test(`greedy: when short option with value '${value}' then eaten`, () => {
456456
const args = ['-w', value];
457457
const options = { with: { type: 'string', short: 'w' } };
@@ -469,7 +469,7 @@ candidateGreedyOptions.forEach((value) => {
469469
const result = parseArgs({ args, options, strict: false });
470470
assert.deepStrictEqual(result, expectedResult);
471471
});
472-
});
472+
}
473473

474474
test('strict: when candidate option value is plain text then does not throw', () => {
475475
const args = ['--with', 'abc'];

0 commit comments

Comments
 (0)