Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replace forEach with for..of in test-parse-args.mjs #49824

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/parallel/test-parse-args.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ const candidateGreedyOptions = [
'--foo',
];

candidateGreedyOptions.forEach((value) => {
for(const value of candidateGreedyOptions) {
lpinca marked this conversation as resolved.
Show resolved Hide resolved
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