Skip to content

Commit

Permalink
Add failing test case for jsx-indent
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbuck committed Jun 3, 2016
1 parent 82b3aa9 commit d0e4879
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/lib/rules/jsx-indent.js
Expand Up @@ -99,6 +99,16 @@ ruleTester.run('jsx-indent', rule, {
].join('\n'),
options: [2],
parserOptions: parserOptions
}, {
code: [
'function App() {',
' return (',
' <App />',
' );',
'}'
].join('\n'),
options: [2],
parserOptions: parserOptions
}],

invalid: [{
Expand Down Expand Up @@ -162,5 +172,27 @@ ruleTester.run('jsx-indent', rule, {
options: [2],
parserOptions: parserOptions,
errors: [{message: 'Expected indentation of 4 space characters but found 0.'}]
}, {
code: [
'function App() {',
' return (',
' <App />',
' );',
'}'
].join('\n'),
options: [2],
parserOptions: parserOptions,
errors: [{message: 'Expected indentation of 2 space characters but found 4.'}]
}, {
code: [
'function App() {',
' return (',
' <App />',
');',
'}'
].join('\n'),
options: [2],
parserOptions: parserOptions,
errors: [{message: 'Expected indentation of 2 space characters but found 0.'}]
}]
});

0 comments on commit d0e4879

Please sign in to comment.