Socket
Socket
Sign inDemoInstall

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
9
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 21.12.0 to 21.12.1

2

package.json
{
"name": "eslint-plugin-jest",
"version": "21.12.0",
"version": "21.12.1",
"description": "Eslint rules for Jest",

@@ -5,0 +5,0 @@ "repository": "jest-community/eslint-plugin-jest",

@@ -16,2 +16,3 @@ 'use strict';

'describe("foo", () => {})',
'describe(`foo`, () => {})',
'xdescribe("foo", () => {})',

@@ -18,0 +19,0 @@ 'fdescribe("foo", () => {})',

@@ -8,2 +8,6 @@ 'use strict';

const isString = node =>
(node.type === 'Literal' && typeof node.value === 'string') ||
node.type === 'TemplateLiteral';
const hasParams = node => node.params.length > 0;

@@ -39,3 +43,3 @@

const callbackFunction = node.arguments[1];
if (name.type !== 'Literal') {
if (!isString(name)) {
context.report({

@@ -47,3 +51,3 @@ message: 'First argument must be name',

if (callbackFunction === undefined) {
context.report({
return context.report({
message: 'Describe requires name and callback arguments',

@@ -53,3 +57,3 @@ loc: paramsLocation(node.arguments),

}
if (callbackFunction && isFunction(callbackFunction)) {
if (isFunction(callbackFunction)) {
if (isAsync(callbackFunction)) {

@@ -56,0 +60,0 @@ context.report({

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