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 27.1.0 to 27.1.1

2

docs/rules/no-restricted-jest-methods.md

@@ -14,3 +14,3 @@ # Disallow specific `jest.` methods (`no-restricted-jest-methods`)

This rule checks for the usage of specific methods on the `jest` object, which
can be used to disallow curtain patterns such as spies and mocks.
can be used to disallow certain patterns such as spies and mocks.

@@ -17,0 +17,0 @@ ## Options

@@ -24,4 +24,8 @@ "use strict";

const shouldUseToBe = expectFnCall => {
const firstArg = (0, _utils2.getFirstMatcherArg)(expectFnCall);
let firstArg = (0, _utils2.getFirstMatcherArg)(expectFnCall);
if (firstArg.type === _utils.AST_NODE_TYPES.UnaryExpression && firstArg.operator === '-') {
firstArg = firstArg.argument;
}
if (firstArg.type === _utils.AST_NODE_TYPES.Literal) {

@@ -28,0 +32,0 @@ // regex literals are classed as literals, but they're actually objects

{
"name": "eslint-plugin-jest",
"version": "27.1.0",
"version": "27.1.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