From 983b88dd3cb5e07919517d3fde4085f60883ded7 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 24 Jul 2024 15:26:33 -0700 Subject: [PATCH] [Tests] `no-array-index-key`: actually run valid tests --- tests/lib/rules/no-array-index-key.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/lib/rules/no-array-index-key.js b/tests/lib/rules/no-array-index-key.js index 5c2974f182..2269e208ca 100644 --- a/tests/lib/rules/no-array-index-key.js +++ b/tests/lib/rules/no-array-index-key.js @@ -27,7 +27,7 @@ const parserOptions = { const ruleTester = new RuleTester({ parserOptions }); ruleTester.run('no-array-index-key', rule, { - valid: parsers.all( + valid: parsers.all([ { code: ';' }, { code: ';' }, { code: ';' }, @@ -96,9 +96,6 @@ ruleTester.run('no-array-index-key', rule, { { code: 'foo.flatMap((a) => )', }, - { - code: 'foo.reduce((a, b) => a.concat(), [])', - }, { code: 'foo.reduce((a, b, i) => a.concat(), [])', }, @@ -139,8 +136,8 @@ ruleTester.run('no-array-index-key', rule, { { code: 'foo?.map(child => )', features: ['optional chaining'], - } - ), + }, + ]), invalid: parsers.all([].concat( {