@@ -646,3 +646,95 @@ ruleTester.run('prefer-lowercase-title with ignoreTopLevelDescribe', rule, {
646646 } ,
647647 ] ,
648648} ) ;
649+
650+ ruleTester . run ( 'prefer-lowercase-title with ignoreTodos' , rule , {
651+ valid : [
652+ {
653+ code : 'test.todo(`Foo`, function () {})' ,
654+ options : [ { ignoreTodos : true } ] ,
655+ } ,
656+ {
657+ code : 'it.todo(`Foo`, function () {})' ,
658+ options : [ { ignoreTodos : true } ] ,
659+ } ,
660+ {
661+ code : 'it.todo("Foo", () => {})' ,
662+ options : [ { ignoreTodos : true } ] ,
663+ } ,
664+ {
665+ code : 'it.only.todo("Foo", () => {})' ,
666+ options : [ { ignoreTodos : true } ] ,
667+ } ,
668+ {
669+ code : 'it.todo.only("Foo", () => {})' ,
670+ options : [ { ignoreTodos : true } ] ,
671+ } ,
672+ ] ,
673+ invalid : [
674+ {
675+ code : "describe('Foo', function () {})" ,
676+ output : "describe('foo', function () {})" ,
677+ options : [ { ignoreTodos : true } ] ,
678+ errors : [
679+ {
680+ messageId : 'unexpectedCase' ,
681+ data : { method : DescribeAlias . describe } ,
682+ column : 10 ,
683+ line : 1 ,
684+ } ,
685+ ] ,
686+ } ,
687+ {
688+ code : "it('Foo', function () {})" ,
689+ output : "it('foo', function () {})" ,
690+ options : [ { ignoreTodos : true } ] ,
691+ errors : [
692+ {
693+ messageId : 'unexpectedCase' ,
694+ data : { method : TestCaseName . it } ,
695+ column : 4 ,
696+ line : 1 ,
697+ } ,
698+ ] ,
699+ } ,
700+ {
701+ code : "test('Foo', function () {})" ,
702+ output : "test('foo', function () {})" ,
703+ options : [ { ignoreTodos : true } ] ,
704+ errors : [
705+ {
706+ messageId : 'unexpectedCase' ,
707+ data : { method : TestCaseName . test } ,
708+ column : 6 ,
709+ line : 1 ,
710+ } ,
711+ ] ,
712+ } ,
713+ {
714+ code : "test.only('Foo', function () {})" ,
715+ output : "test.only('foo', function () {})" ,
716+ options : [ { ignoreTodos : true } ] ,
717+ errors : [
718+ {
719+ messageId : 'unexpectedCase' ,
720+ data : { method : TestCaseName . test } ,
721+ column : 11 ,
722+ line : 1 ,
723+ } ,
724+ ] ,
725+ } ,
726+ {
727+ code : "test.skip('Foo', function () {})" ,
728+ output : "test.skip('foo', function () {})" ,
729+ options : [ { ignoreTodos : true } ] ,
730+ errors : [
731+ {
732+ messageId : 'unexpectedCase' ,
733+ data : { method : TestCaseName . test } ,
734+ column : 11 ,
735+ line : 1 ,
736+ } ,
737+ ] ,
738+ } ,
739+ ] ,
740+ } ) ;
0 commit comments