Skip to content

Commit

Permalink
[Test]: specify parser for "jsx-key" test rule
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLee-LX committed Apr 3, 2020
1 parent bd434b4 commit 7984487
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/lib/rules/jsx-key.js
Expand Up @@ -70,6 +70,11 @@ ruleTester.run('jsx-key', rule, {
errors: [{message: 'Missing "key" prop for element in iterator'}]
}, {
code: '[1, 2, 3]?.map(x => <App />)',
parser: parsers.BABEL_ESLINT,
errors: [{message: 'Missing "key" prop for element in iterator'}]
}, {
code: '[1, 2, 3]?.map(x => <App />)',
parser: parsers['@TYPESCRIPT_ESLINT'],
errors: [{message: 'Missing "key" prop for element in iterator'}]
}, {
code: '[1, 2, 3].map(x => <>{x}</>);',
Expand Down

0 comments on commit 7984487

Please sign in to comment.