@@ -37,6 +37,10 @@ ruleTester.run('self-closing-comp', rule, {
37
37
<Hello name="John" />
38
38
</Hello>
39
39
`
40
+ } , {
41
+ code : 'var HelloJohn = <Hello name="John"> </Hello>;'
42
+ } , {
43
+ code : 'var HelloJohn = <Hello name="John"> </Hello>;'
40
44
} , {
41
45
code : 'var HelloJohn = <div> </div>;'
42
46
} , {
@@ -56,6 +60,12 @@ ruleTester.run('self-closing-comp', rule, {
56
60
</Hello>
57
61
` ,
58
62
options : [ ]
63
+ } , {
64
+ code : 'var HelloJohn = <div> </div>;' ,
65
+ options : [ ]
66
+ } , {
67
+ code : 'var HelloJohn = <div> </div>;' ,
68
+ options : [ ]
59
69
} , {
60
70
code : 'var HelloJohn = <div> </div>;' ,
61
71
options : [ ]
@@ -117,13 +127,6 @@ ruleTester.run('self-closing-comp', rule, {
117
127
message : 'Empty components are self-closing'
118
128
} ]
119
129
} , {
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
- {
127
130
code : 'var HelloJohn = <Hello name="John"></Hello>;' ,
128
131
output : 'var HelloJohn = <Hello name="John" />;' ,
129
132
options : [ ] ,
@@ -137,13 +140,6 @@ ruleTester.run('self-closing-comp', rule, {
137
140
errors : [ {
138
141
message : 'Empty components are self-closing'
139
142
} ]
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
- } ]
147
143
} , {
148
144
code : 'var contentContainer = <div className="content"></div>;' ,
149
145
output : 'var contentContainer = <div className="content" />;' ,
@@ -158,13 +154,6 @@ ruleTester.run('self-closing-comp', rule, {
158
154
errors : [ {
159
155
message : 'Empty components are self-closing'
160
156
} ]
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
- } ]
168
157
}
169
158
]
170
159
} ) ;
0 commit comments