Skip to content

Commit

Permalink
Add a failing test for js-indent props
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Oct 11, 2020
1 parent 632639b commit e5030fd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/lib/rules/jsx-indent-props.js
Expand Up @@ -187,6 +187,29 @@ ruleTester.run('jsx-indent-props', rule, {
{message: 'Expected indentation of 6 space characters but found 4.'},
{message: 'Expected indentation of 6 space characters but found 4.'}
]
}, {
code: [
'const test = true',
' ? <span attr="value" />',
' : (',
' <span',
' attr="otherValue"',
' />',
' )'
].join('\n'),
output: [
'const test = true',
' ? <span attr="value" />',
' : (',
' <span',
' attr="otherValue"',
' />',
' )'
].join('\n'),
options: [2],
errors: [
{message: 'Expected indentation of 6 space characters but found 8.'}
]
}, {
code: [
'{test.isLoading',
Expand Down

0 comments on commit e5030fd

Please sign in to comment.