eslint-plugin-jest
Advanced tools
Comparing version 27.1.0 to 27.1.1
@@ -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": [ |
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
315714
5221