@@ -32,6 +32,14 @@ ruleTester.run('consistent-test-it with fn=test', rule, {
32
32
code : 'xtest("foo")' ,
33
33
options : [ { fn : TestCaseName . test } ] ,
34
34
} ,
35
+ {
36
+ code : 'test.each([])("foo")' ,
37
+ options : [ { fn : TestCaseName . test } ] ,
38
+ } ,
39
+ {
40
+ code : 'test.each``("foo")' ,
41
+ options : [ { fn : TestCaseName . test } ] ,
42
+ } ,
35
43
{
36
44
code : 'describe("suite", () => { test("foo") })' ,
37
45
options : [ { fn : TestCaseName . test } ] ,
@@ -122,6 +130,34 @@ ruleTester.run('consistent-test-it with fn=test', rule, {
122
130
} ,
123
131
] ,
124
132
} ,
133
+ {
134
+ code : 'it.each([])("foo")' ,
135
+ output : 'test.each([])("foo")' ,
136
+ options : [ { fn : TestCaseName . test } ] ,
137
+ errors : [
138
+ {
139
+ messageId : 'consistentMethod' ,
140
+ data : {
141
+ testKeyword : TestCaseName . test ,
142
+ oppositeTestKeyword : TestCaseName . it ,
143
+ } ,
144
+ } ,
145
+ ] ,
146
+ } ,
147
+ {
148
+ code : 'it.each``("foo")' ,
149
+ output : 'test.each``("foo")' ,
150
+ options : [ { fn : TestCaseName . test } ] ,
151
+ errors : [
152
+ {
153
+ messageId : 'consistentMethod' ,
154
+ data : {
155
+ testKeyword : TestCaseName . test ,
156
+ oppositeTestKeyword : TestCaseName . it ,
157
+ } ,
158
+ } ,
159
+ ] ,
160
+ } ,
125
161
{
126
162
code : 'describe("suite", () => { it("foo") })' ,
127
163
output : 'describe("suite", () => { test("foo") })' ,
@@ -165,6 +201,14 @@ ruleTester.run('consistent-test-it with fn=it', rule, {
165
201
code : 'it.concurrent("foo")' ,
166
202
options : [ { fn : TestCaseName . it } ] ,
167
203
} ,
204
+ {
205
+ code : 'it.each([])("foo")' ,
206
+ options : [ { fn : TestCaseName . it } ] ,
207
+ } ,
208
+ {
209
+ code : 'it.each``("foo")' ,
210
+ options : [ { fn : TestCaseName . it } ] ,
211
+ } ,
168
212
{
169
213
code : 'describe("suite", () => { it("foo") })' ,
170
214
options : [ { fn : TestCaseName . it } ] ,
@@ -241,6 +285,34 @@ ruleTester.run('consistent-test-it with fn=it', rule, {
241
285
} ,
242
286
] ,
243
287
} ,
288
+ {
289
+ code : 'test.each([])("foo")' ,
290
+ output : 'it.each([])("foo")' ,
291
+ options : [ { fn : TestCaseName . it } ] ,
292
+ errors : [
293
+ {
294
+ messageId : 'consistentMethod' ,
295
+ data : {
296
+ testKeyword : TestCaseName . it ,
297
+ oppositeTestKeyword : TestCaseName . test ,
298
+ } ,
299
+ } ,
300
+ ] ,
301
+ } ,
302
+ {
303
+ code : 'test.each``("foo")' ,
304
+ output : 'it.each``("foo")' ,
305
+ options : [ { fn : TestCaseName . it } ] ,
306
+ errors : [
307
+ {
308
+ messageId : 'consistentMethod' ,
309
+ data : {
310
+ testKeyword : TestCaseName . it ,
311
+ oppositeTestKeyword : TestCaseName . test ,
312
+ } ,
313
+ } ,
314
+ ] ,
315
+ } ,
244
316
{
245
317
code : 'describe("suite", () => { test("foo") })' ,
246
318
output : 'describe("suite", () => { it("foo") })' ,
0 commit comments