From 81002bb61ac591cb8a934259ad4e6e376f1eaa6f Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sat, 23 Sep 2023 14:29:16 +0530 Subject: [PATCH 1/3] test: replace forEach with for..of in test-parse-args.mjs --- test/parallel/test-parse-args.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-parse-args.mjs b/test/parallel/test-parse-args.mjs index 98c162643e64ff..2322b43938cff0 100644 --- a/test/parallel/test-parse-args.mjs +++ b/test/parallel/test-parse-args.mjs @@ -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' } }; @@ -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']; From 313d324f4f5452f5c4bc4e3f980e09c2af3d3f10 Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sun, 24 Sep 2023 15:34:37 +0530 Subject: [PATCH 2/3] test: replace forEach with for..of in test-parse-args.mjs --- test/parallel/test-parse-args.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-parse-args.mjs b/test/parallel/test-parse-args.mjs index 2322b43938cff0..e7a96ba80ded17 100644 --- a/test/parallel/test-parse-args.mjs +++ b/test/parallel/test-parse-args.mjs @@ -469,7 +469,7 @@ for(const value of candidateGreedyOptions) { 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']; From 78599aed63ae53a95c3329378ed837c29a985ae9 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Fri, 6 Oct 2023 19:24:16 +0200 Subject: [PATCH 3/3] Update test/parallel/test-parse-args.mjs --- test/parallel/test-parse-args.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-parse-args.mjs b/test/parallel/test-parse-args.mjs index e7a96ba80ded17..41af0eba1c923d 100644 --- a/test/parallel/test-parse-args.mjs +++ b/test/parallel/test-parse-args.mjs @@ -451,7 +451,7 @@ const candidateGreedyOptions = [ '--foo', ]; -for(const value of candidateGreedyOptions) { +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' } };