Skip to content
Permalink
Browse files
fix(no-disabled-tests): adjust selector to match only test functions (#…
  • Loading branch information
G-Rath committed Mar 6, 2021
1 parent 27a7245 commit c9169022c7e4b9c7bd5f09060152f7136ee18521
Showing with 4 additions and 2 deletions.
  1. +2 −0 src/rules/__tests__/no-disabled-tests.test.ts
  2. +2 −2 src/rules/no-disabled-tests.ts
@@ -29,6 +29,8 @@ ruleTester.run('no-disabled-tests', rule, {
'(a || b).f()',
'itHappensToStartWithIt()',
'testSomething()',
'xitSomethingElse()',
'xitiViewMap()',
dedent`
import { pending } from "actions"
@@ -77,13 +77,13 @@ export default createRule({
'CallExpression[callee.name="xdescribe"]'(node) {
context.report({ messageId: 'disabledSuite', node });
},
'CallExpression[callee.name=/^xit|xtest$/]'(node) {
'CallExpression[callee.name=/^(xit|xtest)$/]'(node) {
context.report({ messageId: 'disabledTest', node });
},
'CallExpression[callee.name="describe"]:exit'() {
suiteDepth--;
},
'CallExpression[callee.name=/^it|test$/]:exit'() {
'CallExpression[callee.name=/^(it|test)$/]:exit'() {
testDepth--;
},
};

0 comments on commit c916902

Please sign in to comment.