Skip to content

Commit efbab1d

Browse files
committed
Add test case for more than one prop in a line
Just to make sure this still works properly.
1 parent 078cf1a commit efbab1d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ ruleTester.run('jsx-indent-props', rule, {
8080
' />'
8181
].join('\n'),
8282
options: ['aligned']
83+
}, {
84+
code: [
85+
'<App aaa x',
86+
' b y',
87+
' cc',
88+
'/>'
89+
].join('\n'),
90+
options: ['aligned']
91+
}, {
92+
code: [
93+
'const test = <App aaa x',
94+
' b y',
95+
' cc',
96+
' />'
97+
].join('\n'),
98+
options: ['aligned']
8399
}, {
84100
code: [
85101
'<App aaa',
@@ -170,6 +186,19 @@ ruleTester.run('jsx-indent-props', rule, {
170186
].join('\n'),
171187
options: ['aligned'],
172188
errors: [{message: 'Expected indentation of 5 space characters but found 2.'}]
189+
}, {
190+
code: [
191+
'<App a x',
192+
' b y',
193+
'/>'
194+
].join('\n'),
195+
output: [
196+
'<App a x',
197+
' b y',
198+
'/>'
199+
].join('\n'),
200+
options: ['aligned'],
201+
errors: [{message: 'Expected indentation of 5 space characters but found 2.'}]
173202
}, {
174203
code: [
175204
'<App a',

0 commit comments

Comments
 (0)