summaryrefslogtreecommitdiff
path: root/tests/node_compat/test/parallel/test-parse-args.mjs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-06-11 12:41:44 +0100
committerGitHub <noreply@github.com>2024-06-11 11:41:44 +0000
commit6a356aff1380e79d67738c5b43aa2b5fee76600d (patch)
treebe4aadc62a523ff280820958a1a3829f1a18ca7d /tests/node_compat/test/parallel/test-parse-args.mjs
parent3d41b486da7dcba49c8a18b45425e356c329d986 (diff)
chore: sync up Node.js test files for v20.11.1 (#24066)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'tests/node_compat/test/parallel/test-parse-args.mjs')
-rw-r--r--tests/node_compat/test/parallel/test-parse-args.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/node_compat/test/parallel/test-parse-args.mjs b/tests/node_compat/test/parallel/test-parse-args.mjs
index f8bc14a6c..0d5aa72f6 100644
--- a/tests/node_compat/test/parallel/test-parse-args.mjs
+++ b/tests/node_compat/test/parallel/test-parse-args.mjs
@@ -458,7 +458,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' } };
@@ -476,7 +476,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'];
@@ -980,7 +980,7 @@ test('tokens:true should not include the default options after the args input',
test('proto as default value must be ignored', () => {
const args = [];
- const options = Object.create(null);
+ const options = { __proto__: null };
// eslint-disable-next-line no-proto
options.__proto__ = { type: 'string', default: 'HELLO' };