eslint-plugin-jest 26.8.0 → 26.8.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.
@@ -75,13 +75,15 @@ var _default = (0, _utils2.createRule)({
75
75
 
76
76
  return {
77
77
  CallExpression(node) {
78
- var _parseJestFnCall;
78
+ const jestFnCall = (0, _utils2.parseJestFnCall)(node, context);
79
79
 
80
- const {
81
- type: jestFnCallType
82
- } = (_parseJestFnCall = (0, _utils2.parseJestFnCall)(node, context)) !== null && _parseJestFnCall !== void 0 ? _parseJestFnCall : {};
80
+ if ((jestFnCall === null || jestFnCall === void 0 ? void 0 : jestFnCall.type) === 'expect') {
81
+ var _jestFnCall$head$node;
82
+
83
+ if (((_jestFnCall$head$node = jestFnCall.head.node.parent) === null || _jestFnCall$head$node === void 0 ? void 0 : _jestFnCall$head$node.type) === _utils.AST_NODE_TYPES.MemberExpression && jestFnCall.members.length === 1 && !['assertions', 'hasAssertions'].includes((0, _utils2.getAccessorValue)(jestFnCall.members[0]))) {
84
+ return;
85
+ }
83
86
 
84
- if (jestFnCallType === 'expect') {
85
87
  const parent = callStack[callStack.length - 1];
86
88
 
87
89
  if (!parent || parent === _utils2.DescribeAlias.describe) {
@@ -94,7 +96,7 @@ var _default = (0, _utils2.createRule)({
94
96
  return;
95
97
  }
96
98
 
97
- if (jestFnCallType === 'test' || isCustomTestBlockFunction(node)) {
99
+ if ((jestFnCall === null || jestFnCall === void 0 ? void 0 : jestFnCall.type) === 'test' || isCustomTestBlockFunction(node)) {
98
100
  callStack.push('test');
99
101
  }
100
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest",
3
- "version": "26.8.0",
3
+ "version": "26.8.1",
4
4
  "description": "ESLint rules for Jest",
5
5
  "keywords": [
6
6
  "eslint",