eslint-plugin-jest 26.2.1 → 26.2.2
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.
- package/lib/rules/utils.js +1 -7
- package/package.json +1 -1
package/lib/rules/utils.js
CHANGED
|
@@ -582,14 +582,8 @@ const collectReferences = scope => {
|
|
|
582
582
|
if (ref.defs.length === 0) {
|
|
583
583
|
continue;
|
|
584
584
|
}
|
|
585
|
-
/* istanbul ignore if */
|
|
586
585
|
|
|
587
|
-
|
|
588
|
-
if (ref.defs.length > 1) {
|
|
589
|
-
throw new Error(`Reference unexpected had more than one definition - please file a github issue at https://github.com/jest-community/eslint-plugin-jest`);
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
const [def] = ref.defs;
|
|
586
|
+
const def = ref.defs[ref.defs.length - 1];
|
|
593
587
|
const importDetails = describePossibleImportDef(def);
|
|
594
588
|
|
|
595
589
|
if (importDetails) {
|