Skip to content

Commit aeff5ea

Browse files
Hypnosphiljharb
authored andcommitted
[Tests] Add passing test for js-indent props
Fixed by jsx-eslint#2826.
1 parent 237547e commit aeff5ea

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/lib/rules/jsx-indent-props.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,29 @@ ruleTester.run('jsx-indent-props', rule, {
204204
{message: 'Expected indentation of 6 space characters but found 4.'},
205205
{message: 'Expected indentation of 6 space characters but found 4.'}
206206
]
207+
}, {
208+
code: [
209+
'const test = true',
210+
' ? <span attr="value" />',
211+
' : (',
212+
' <span',
213+
' attr="otherValue"',
214+
' />',
215+
' )'
216+
].join('\n'),
217+
output: [
218+
'const test = true',
219+
' ? <span attr="value" />',
220+
' : (',
221+
' <span',
222+
' attr="otherValue"',
223+
' />',
224+
' )'
225+
].join('\n'),
226+
options: [2],
227+
errors: [
228+
{message: 'Expected indentation of 6 space characters but found 8.'}
229+
]
207230
}, {
208231
code: [
209232
'{test.isLoading',

0 commit comments

Comments
 (0)