File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const ruleTester = new TSESLint.RuleTester({
15
15
16
16
ruleTester . run ( 'expect-expect' , rule , {
17
17
valid : [
18
+ 'it.todo("will test something eventually")' ,
19
+ 'test.todo("will test something eventually")' ,
18
20
"['x']();" ,
19
21
'it("should pass", () => expect(true).toBeDefined())' ,
20
22
'test("should pass", () => expect(true).toBeDefined())' ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
createRule ,
12
12
getNodeName ,
13
13
getTestCallExpressionsFromDeclaredVariables ,
14
+ isSupportedAccessor ,
14
15
isTestCaseCall ,
15
16
} from './utils' ;
16
17
@@ -116,6 +117,13 @@ export default createRule<
116
117
isTestCaseCall ( node ) ||
117
118
additionalTestBlockFunctions . includes ( name )
118
119
) {
120
+ if (
121
+ node . callee . type === AST_NODE_TYPES . MemberExpression &&
122
+ isSupportedAccessor ( node . callee . property , 'todo' )
123
+ ) {
124
+ return ;
125
+ }
126
+
119
127
unchecked . push ( node ) ;
120
128
} else if ( matchesAssertFunctionName ( name , assertFunctionNames ) ) {
121
129
// Return early in case of nested `it` statements.
You can’t perform that action at this time.
0 commit comments