Socket
Socket
Sign inDemoInstall

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
11
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 26.5.0 to 26.5.1

25

lib/rules/prefer-called-with.js

@@ -36,16 +36,17 @@ "use strict";

matcher
} = (0, _utils.parseExpectCall)(node); // Could check resolves/rejects here but not a likely idiom.
} = (0, _utils.parseExpectCall)(node);
if (matcher && !modifier) {
if (['toBeCalled', 'toHaveBeenCalled'].includes(matcher.name)) {
context.report({
data: {
name: matcher.name
},
// todo: rename to 'matcherName'
messageId: 'preferCalledWith',
node: matcher.node.property
});
}
if (!matcher || (modifier === null || modifier === void 0 ? void 0 : modifier.name) === _utils.ModifierName.not || modifier !== null && modifier !== void 0 && modifier.negation) {
return;
}
if (['toBeCalled', 'toHaveBeenCalled'].includes(matcher.name)) {
context.report({
data: {
name: matcher.name
},
messageId: 'preferCalledWith',
node: matcher.node.property
});
}
}

@@ -52,0 +53,0 @@

{
"name": "eslint-plugin-jest",
"version": "26.5.0",
"version": "26.5.1",
"description": "ESLint rules for Jest",

@@ -5,0 +5,0 @@ "keywords": [

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