@@ -197,24 +197,27 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
197
197
} , {
198
198
code : [
199
199
'<App foo={function() {' ,
200
- ' console.log(\'bar\');' ,
201
- '}}/>'
200
+ ' console.log(\'bar\');' ,
201
+ ' }}' ,
202
+ ' />'
202
203
] . join ( '\n' ) ,
203
204
options : [ { location : 'props-aligned' } ] ,
204
205
parserOptions : parserOptions
205
206
} , {
206
207
code : [
207
208
'<App foo={function() {' ,
208
209
' console.log(\'bar\');' ,
209
- '}}/>'
210
+ '}}' ,
211
+ '/>'
210
212
] . join ( '\n' ) ,
211
213
options : [ { location : 'tag-aligned' } ] ,
212
214
parserOptions : parserOptions
213
215
} , {
214
216
code : [
215
217
'<App foo={function() {' ,
216
218
' console.log(\'bar\');' ,
217
- '}}/>'
219
+ '}}' ,
220
+ '/>'
218
221
] . join ( '\n' ) ,
219
222
options : [ { location : 'line-aligned' } ] ,
220
223
parserOptions : parserOptions
@@ -383,6 +386,18 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
383
386
selfClosing : false
384
387
} ] ,
385
388
parserOptions : parserOptions
389
+ } , {
390
+ code : [
391
+ '<div className={[' ,
392
+ ' "some",' ,
393
+ ' "stuff",' ,
394
+ ' 2 ]}' ,
395
+ '>' ,
396
+ ' Some text' ,
397
+ '</div>'
398
+ ] . join ( '\n' ) ,
399
+ options : [ { location : 'tag-aligned' } ] ,
400
+ parserOptions : parserOptions
386
401
} ] ,
387
402
388
403
invalid : [ {
@@ -919,5 +934,30 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
919
934
options : [ { location : 'line-aligned' } ] ,
920
935
parserOptions : parserOptions ,
921
936
errors : [ MESSAGE_AFTER_TAG ]
937
+ } , {
938
+ code : [
939
+ '<div className={[' ,
940
+ ' "some",' ,
941
+ ' "stuff",' ,
942
+ ' 2 ]}>' ,
943
+ ' Some text' ,
944
+ '</div>'
945
+ ] . join ( '\n' ) ,
946
+ output : [
947
+ '<div className={[' ,
948
+ ' "some",' ,
949
+ ' "stuff",' ,
950
+ ' 2 ]}' ,
951
+ '>' ,
952
+ ' Some text' ,
953
+ '</div>'
954
+ ] . join ( '\n' ) ,
955
+ options : [ { location : 'tag-aligned' } ] ,
956
+ parserOptions : parserOptions ,
957
+ errors : [ {
958
+ message : messageWithDetails ( MESSAGE_TAG_ALIGNED , 1 , true ) ,
959
+ line : 4 ,
960
+ column : 7
961
+ } ]
922
962
} ]
923
963
} ) ;
0 commit comments