Skip to content

Commit

Permalink
test: replace forEach with for..of in test-parse-args.mjs
Browse files Browse the repository at this point in the history
PR-URL: #49824
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
niyashiyas authored and targos committed Nov 11, 2023
1 parent c99e51e commit 9d83651
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-parse-args.mjs
Expand Up @@ -451,7 +451,7 @@ const candidateGreedyOptions = [
'--foo',
];

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

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

0 comments on commit 9d83651

Please sign in to comment.