eslint-plugin-jest 26.5.0 → 26.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,19 +33,20 @@ var _default = (0, _utils.createRule)({
33
33
  const {
34
34
  modifier,
35
35
  matcher
36
- } = (0, _utils.parseExpectCall)(node); // Could check resolves/rejects here but not a likely idiom.
37
-
38
- if (matcher && !modifier) {
39
- if (['toBeCalled', 'toHaveBeenCalled'].includes(matcher.name)) {
40
- context.report({
41
- data: {
42
- name: matcher.name
43
- },
44
- // todo: rename to 'matcherName'
45
- messageId: 'preferCalledWith',
46
- node: matcher.node.property
47
- });
48
- }
36
+ } = (0, _utils.parseExpectCall)(node);
37
+
38
+ if (!matcher || (modifier === null || modifier === void 0 ? void 0 : modifier.name) === _utils.ModifierName.not || modifier !== null && modifier !== void 0 && modifier.negation) {
39
+ return;
40
+ }
41
+
42
+ if (['toBeCalled', 'toHaveBeenCalled'].includes(matcher.name)) {
43
+ context.report({
44
+ data: {
45
+ name: matcher.name
46
+ },
47
+ messageId: 'preferCalledWith',
48
+ node: matcher.node.property
49
+ });
49
50
  }
50
51
  }
51
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest",
3
- "version": "26.5.0",
3
+ "version": "26.5.1",
4
4
  "description": "ESLint rules for Jest",
5
5
  "keywords": [
6
6
  "eslint",