Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76004f3

Browse filesBrowse files
authored
test: replace forEach with for..of in test-parse-args.mjs
PR-URL: #49824 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 387e292 commit 76004f3
Copy full SHA for 76004f3

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-parse-args.mjs‎

Copy file name to clipboardExpand all lines: test/parallel/test-parse-args.mjs
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.