eslint-plugin-jest
Advanced tools
Comparing version
@@ -102,5 +102,13 @@ "use strict"; | ||
for (const property of requireNode.declarations[0].id.properties) { | ||
if (property.type === _utils.AST_NODE_TYPES.Property && (0, _utils2.isSupportedAccessor)(property.key)) { | ||
functionsToImport.add((0, _utils2.getAccessorValue)(property.key)); | ||
if (property.type !== _utils.AST_NODE_TYPES.Property || !(0, _utils2.isSupportedAccessor)(property.key)) { | ||
continue; | ||
} | ||
let importName = (0, _utils2.getAccessorValue)(property.key); | ||
if ((0, _utils2.isSupportedAccessor)(property.value)) { | ||
const local = (0, _utils2.getAccessorValue)(property.value); | ||
if (importName !== local) { | ||
importName += `: ${local}`; | ||
} | ||
} | ||
functionsToImport.add(importName); | ||
} | ||
@@ -107,0 +115,0 @@ } |
{ | ||
"name": "eslint-plugin-jest", | ||
"version": "28.13.2", | ||
"version": "28.13.3", | ||
"description": "ESLint rules for Jest", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
357081
0.1%6003
0.13%