From 9d836516e6809425c7285b2836f960cd13326841 Mon Sep 17 00:00:00 2001 From: Niya Shiyas <98641481+niyashiyas@users.noreply.github.com> Date: Mon, 9 Oct 2023 18:53:15 +0530 Subject: [PATCH] test: replace forEach with for..of in test-parse-args.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49824 Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen --- 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..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'];