eslint-plugin-jest
Advanced tools
Comparing version 22.6.3 to 22.6.4
@@ -14,3 +14,3 @@ 'use strict'; | ||
ruleTester.run('no-commented-out-tests', rule, { | ||
valid: ['// foo("bar", function () {})', 'describe("foo", function () {})', 'it("foo", function () {})', 'describe.only("foo", function () {})', 'it.only("foo", function () {})', 'test("foo", function () {})', 'test.only("foo", function () {})', 'var appliedSkip = describe.skip; appliedSkip.apply(describe)', 'var calledSkip = it.skip; calledSkip.call(it)', '({ f: function () {} }).f()', '(a || b).f()', 'itHappensToStartWithIt()', 'testSomething()', ['import { pending } from "actions"', '', 'test("foo", () => {', ' expect(pending()).toEqual({})', '})'].join('\n'), ['const { pending } = require("actions")', '', 'test("foo", () => {', ' expect(pending()).toEqual({})', '})'].join('\n'), ['test("foo", () => {', ' const pending = getPending()', ' expect(pending()).toEqual({})', '})'].join('\n'), ['test("foo", () => {', ' expect(pending()).toEqual({})', '})', '', 'function pending() {', ' return {}', '}'].join('\n')], | ||
valid: ['// foo("bar", function () {})', 'describe("foo", function () {})', 'it("foo", function () {})', 'describe.only("foo", function () {})', 'it.only("foo", function () {})', 'test("foo", function () {})', 'test.only("foo", function () {})', 'var appliedSkip = describe.skip; appliedSkip.apply(describe)', 'var calledSkip = it.skip; calledSkip.call(it)', '({ f: function () {} }).f()', '(a || b).f()', 'itHappensToStartWithIt()', 'testSomething()', '// latest(dates)', '// TODO: unify with Git implementation from Shipit (?)', ['import { pending } from "actions"', '', 'test("foo", () => {', ' expect(pending()).toEqual({})', '})'].join('\n'), ['const { pending } = require("actions")', '', 'test("foo", () => {', ' expect(pending()).toEqual({})', '})'].join('\n'), ['test("foo", () => {', ' const pending = getPending()', ' expect(pending()).toEqual({})', '})'].join('\n'), ['test("foo", () => {', ' expect(pending()).toEqual({})', '})', '', 'function pending() {', ' return {}', '}'].join('\n')], | ||
invalid: [{ | ||
@@ -17,0 +17,0 @@ code: '// describe("foo", function () {})', |
@@ -9,3 +9,3 @@ 'use strict'; | ||
function hasTests(node) { | ||
return /(x|f)?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/m.test(node.value); | ||
return /^\s*(x|f)?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/m.test(node.value); | ||
} | ||
@@ -12,0 +12,0 @@ |
{ | ||
"name": "eslint-plugin-jest", | ||
"version": "22.6.3", | ||
"version": "22.6.4", | ||
"description": "Eslint rules for Jest", | ||
@@ -5,0 +5,0 @@ "repository": "jest-community/eslint-plugin-jest", |
@@ -27,2 +27,4 @@ 'use strict'; | ||
'testSomething()', | ||
'// latest(dates)', | ||
'// TODO: unify with Git implementation from Shipit (?)', | ||
[ | ||
@@ -29,0 +31,0 @@ 'import { pending } from "actions"', |
@@ -8,3 +8,3 @@ 'use strict'; | ||
function hasTests(node) { | ||
return /(x|f)?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/m.test( | ||
return /^\s*(x|f)?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/m.test( | ||
node.value, | ||
@@ -11,0 +11,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
384290
11672