diff --git a/test/parallel/test-parse-args.mjs b/test/parallel/test-parse-args.mjs index 98c162643e64ff..41af0eba1c923d 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'];