@@ -270,7 +270,34 @@ ruleTester.run('prefer-lowercase-title with ignore=describe', rule, {
270
270
options : [ { ignore : [ DescribeAlias . describe ] } ] ,
271
271
} ,
272
272
] ,
273
- invalid : [ ] ,
273
+ invalid : [
274
+ {
275
+ code : "test('Foo', function () {})" ,
276
+ output : "test('foo', function () {})" ,
277
+ options : [ { ignore : [ DescribeAlias . describe ] } ] ,
278
+ errors : [
279
+ {
280
+ messageId : 'unexpectedLowercase' ,
281
+ data : { method : TestCaseName . test } ,
282
+ column : 6 ,
283
+ line : 1 ,
284
+ } ,
285
+ ] ,
286
+ } ,
287
+ {
288
+ code : "xit('Foo', function () {})" ,
289
+ output : "xit('foo', function () {})" ,
290
+ options : [ { ignore : [ DescribeAlias . describe ] } ] ,
291
+ errors : [
292
+ {
293
+ messageId : 'unexpectedLowercase' ,
294
+ data : { method : TestCaseName . xit } ,
295
+ column : 5 ,
296
+ line : 1 ,
297
+ } ,
298
+ ] ,
299
+ } ,
300
+ ] ,
274
301
} ) ;
275
302
276
303
ruleTester . run ( 'prefer-lowercase-title with ignore=test' , rule , {
@@ -296,7 +323,47 @@ ruleTester.run('prefer-lowercase-title with ignore=test', rule, {
296
323
options : [ { ignore : [ TestCaseName . test ] } ] ,
297
324
} ,
298
325
] ,
299
- invalid : [ ] ,
326
+ invalid : [
327
+ {
328
+ code : "describe('Foo', function () {})" ,
329
+ output : "describe('foo', function () {})" ,
330
+ options : [ { ignore : [ TestCaseName . test ] } ] ,
331
+ errors : [
332
+ {
333
+ messageId : 'unexpectedLowercase' ,
334
+ data : { method : DescribeAlias . describe } ,
335
+ column : 10 ,
336
+ line : 1 ,
337
+ } ,
338
+ ] ,
339
+ } ,
340
+ {
341
+ code : "it('Foo', function () {})" ,
342
+ output : "it('foo', function () {})" ,
343
+ options : [ { ignore : [ TestCaseName . test ] } ] ,
344
+ errors : [
345
+ {
346
+ messageId : 'unexpectedLowercase' ,
347
+ data : { method : TestCaseName . it } ,
348
+ column : 4 ,
349
+ line : 1 ,
350
+ } ,
351
+ ] ,
352
+ } ,
353
+ {
354
+ code : "xit('Foo', function () {})" ,
355
+ output : "xit('foo', function () {})" ,
356
+ options : [ { ignore : [ TestCaseName . test ] } ] ,
357
+ errors : [
358
+ {
359
+ messageId : 'unexpectedLowercase' ,
360
+ data : { method : TestCaseName . xit } ,
361
+ column : 5 ,
362
+ line : 1 ,
363
+ } ,
364
+ ] ,
365
+ } ,
366
+ ] ,
300
367
} ) ;
301
368
302
369
ruleTester . run ( 'prefer-lowercase-title with ignore=it' , rule , {
@@ -322,7 +389,47 @@ ruleTester.run('prefer-lowercase-title with ignore=it', rule, {
322
389
options : [ { ignore : [ TestCaseName . it ] } ] ,
323
390
} ,
324
391
] ,
325
- invalid : [ ] ,
392
+ invalid : [
393
+ {
394
+ code : "describe('Foo', function () {})" ,
395
+ output : "describe('foo', function () {})" ,
396
+ options : [ { ignore : [ TestCaseName . it ] } ] ,
397
+ errors : [
398
+ {
399
+ messageId : 'unexpectedLowercase' ,
400
+ data : { method : DescribeAlias . describe } ,
401
+ column : 10 ,
402
+ line : 1 ,
403
+ } ,
404
+ ] ,
405
+ } ,
406
+ {
407
+ code : "test('Foo', function () {})" ,
408
+ output : "test('foo', function () {})" ,
409
+ options : [ { ignore : [ TestCaseName . it ] } ] ,
410
+ errors : [
411
+ {
412
+ messageId : 'unexpectedLowercase' ,
413
+ data : { method : TestCaseName . test } ,
414
+ column : 6 ,
415
+ line : 1 ,
416
+ } ,
417
+ ] ,
418
+ } ,
419
+ {
420
+ code : "xtest('Foo', function () {})" ,
421
+ output : "xtest('foo', function () {})" ,
422
+ options : [ { ignore : [ TestCaseName . it ] } ] ,
423
+ errors : [
424
+ {
425
+ messageId : 'unexpectedLowercase' ,
426
+ data : { method : TestCaseName . xtest } ,
427
+ column : 7 ,
428
+ line : 1 ,
429
+ } ,
430
+ ] ,
431
+ } ,
432
+ ] ,
326
433
} ) ;
327
434
328
435
ruleTester . run ( 'prefer-lowercase-title with allowedPrefixes' , rule , {
@@ -368,7 +475,7 @@ ruleTester.run('prefer-lowercase-title with ignoreTopLevelDescribe', rule, {
368
475
expect('abc').toBe('abc');
369
476
});
370
477
});
371
-
478
+
372
479
describe('Booleans', () => {
373
480
it('are booleans', () => {
374
481
expect(true).toBe(true);
0 commit comments