@@ -37,6 +37,10 @@ ruleTester.run('self-closing-comp', rule, {
3737 <Hello name="John" />
3838 </Hello>
3939 `
40+ } , {
41+ code : 'var HelloJohn = <Hello name="John"> </Hello>;'
42+ } , {
43+ code : 'var HelloJohn = <Hello name="John"> </Hello>;'
4044 } , {
4145 code : 'var HelloJohn = <div> </div>;'
4246 } , {
@@ -56,6 +60,12 @@ ruleTester.run('self-closing-comp', rule, {
5660 </Hello>
5761 ` ,
5862 options : [ ]
63+ } , {
64+ code : 'var HelloJohn = <div> </div>;' ,
65+ options : [ ]
66+ } , {
67+ code : 'var HelloJohn = <div> </div>;' ,
68+ options : [ ]
5969 } , {
6070 code : 'var HelloJohn = <div> </div>;' ,
6171 options : [ ]
@@ -117,13 +127,6 @@ ruleTester.run('self-closing-comp', rule, {
117127 message : 'Empty components are self-closing'
118128 } ]
119129 } , {
120- code : 'var HelloJohn = <Hello name="John"> </Hello>;' ,
121- output : 'var HelloJohn = <Hello name="John" />;' ,
122- errors : [ {
123- message : 'Empty components are self-closing'
124- } ]
125- } ,
126- {
127130 code : 'var HelloJohn = <Hello name="John"></Hello>;' ,
128131 output : 'var HelloJohn = <Hello name="John" />;' ,
129132 options : [ ] ,
@@ -137,13 +140,6 @@ ruleTester.run('self-closing-comp', rule, {
137140 errors : [ {
138141 message : 'Empty components are self-closing'
139142 } ]
140- } , {
141- code : 'var HelloJohn = <Hello name="John"> </Hello>;' ,
142- output : 'var HelloJohn = <Hello name="John" />;' ,
143- options : [ ] ,
144- errors : [ {
145- message : 'Empty components are self-closing'
146- } ]
147143 } , {
148144 code : 'var contentContainer = <div className="content"></div>;' ,
149145 output : 'var contentContainer = <div className="content" />;' ,
@@ -158,13 +154,6 @@ ruleTester.run('self-closing-comp', rule, {
158154 errors : [ {
159155 message : 'Empty components are self-closing'
160156 } ]
161- } , {
162- code : 'var contentContainer = <div className="content"> </div>;' ,
163- output : 'var contentContainer = <div className="content" />;' ,
164- options : [ { html : true } ] ,
165- errors : [ {
166- message : 'Empty components are self-closing'
167- } ]
168157 }
169158 ]
170159} ) ;
0 commit comments