@@ -197,24 +197,27 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
197197 } , {
198198 code : [
199199 '<App foo={function() {' ,
200- ' console.log(\'bar\');' ,
201- '}}/>'
200+ ' console.log(\'bar\');' ,
201+ ' }}' ,
202+ ' />'
202203 ] . join ( '\n' ) ,
203204 options : [ { location : 'props-aligned' } ] ,
204205 parserOptions : parserOptions
205206 } , {
206207 code : [
207208 '<App foo={function() {' ,
208209 ' console.log(\'bar\');' ,
209- '}}/>'
210+ '}}' ,
211+ '/>'
210212 ] . join ( '\n' ) ,
211213 options : [ { location : 'tag-aligned' } ] ,
212214 parserOptions : parserOptions
213215 } , {
214216 code : [
215217 '<App foo={function() {' ,
216218 ' console.log(\'bar\');' ,
217- '}}/>'
219+ '}}' ,
220+ '/>'
218221 ] . join ( '\n' ) ,
219222 options : [ { location : 'line-aligned' } ] ,
220223 parserOptions : parserOptions
@@ -383,6 +386,18 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
383386 selfClosing : false
384387 } ] ,
385388 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
386401 } ] ,
387402
388403 invalid : [ {
@@ -919,5 +934,30 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
919934 options : [ { location : 'line-aligned' } ] ,
920935 parserOptions : parserOptions ,
921936 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+ } ]
922962 } ]
923963} ) ;
0 commit comments