Skip to content

Commit

Permalink
fix(no-disabled-tests): stop picking up all funcs that start it/test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfranklin authored and SimenB committed Oct 16, 2018
1 parent 83a4c48 commit 9b5939e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions rules/__tests__/no-disabled-tests.test.js
Expand Up @@ -21,6 +21,8 @@ ruleTester.run('no-disabled-tests', rule, {
'var calledSkip = it.skip; calledSkip.call(it)',
'({ f: function () {} }).f()',
'(a || b).f()',
'itHappensToStartWithIt()',
'testSomething()',
[
'import { pending } from "actions"',
'',
Expand Down
4 changes: 2 additions & 2 deletions rules/no-disabled-tests.js
Expand Up @@ -44,10 +44,10 @@ module.exports = {
'CallExpression[callee.name="describe"]'() {
suiteDepth++;
},
'CallExpression[callee.name=/^it|test$/]'() {
'CallExpression[callee.name=/^(it|test)$/]'() {
testDepth++;
},
'CallExpression[callee.name=/^it|test$/][arguments.length<2]'(node) {
'CallExpression[callee.name=/^(it|test)$/][arguments.length<2]'(node) {
context.report({
message: 'Test is missing function argument',
node,
Expand Down

0 comments on commit 9b5939e

Please sign in to comment.