Skip to content

Commit

Permalink
[Test] jsx-filename-extension: Add test for allow as-needed not a c…
Browse files Browse the repository at this point in the history
…omponent
  • Loading branch information
remcohaszing committed Aug 9, 2020
1 parent 1292f5a commit e638cec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/lib/rules/jsx-filename-extension.js
Expand Up @@ -87,6 +87,11 @@ ruleTester.run('jsx-filename-extension', rule, {
code: withoutJSX,
options: [{allow: 'as-needed'}],
errors: [{message: 'Only files containing JSX may use the extension \'.jsx\''}]
}, {
filename: 'notAComponent.js',
code: withJSXElement,
options: [{allow: 'as-needed'}],
errors: [{message: 'JSX not allowed in files with extension \'.js\''}]
}, {
filename: 'MyComponent.jsx',
code: withJSXElement,
Expand Down

0 comments on commit e638cec

Please sign in to comment.