Socket
Socket
Sign inDemoInstall

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
12
Versions
325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest - npm Package Compare versions

Comparing version 22.6.3 to 22.6.4

2

lib/rules/__tests__/no-commented-out-tests.test.js

@@ -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 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc