Skip to content

Commit 148d3cc

Browse files
Gpxgndelia
andauthored
Update lib/rules/no-wait-for-snapshot.ts
Co-authored-by: Gonzalo D'Elia <[email protected]>
1 parent 4f1bafb commit 148d3cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rules/no-wait-for-snapshot.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ export default ESLintUtils.RuleCreator(getDocsUrl)<Options, MessageIds>({
7676
},
7777
'Program:exit'() {
7878
const testingLibraryUtilUsage = asyncUtilsUsage.filter(usage => {
79-
if (usage.node.type === 'MemberExpression') {
80-
const object = usage.node.object as TSESTree.Identifier;
79+
if (isMemberExpression(usage.node)) {
80+
// object is automatically a TSESTree.Identifier
81+
const object = usage.node.object;
8182

8283
return importedAsyncUtils.includes(object.name);
8384
}

0 commit comments

Comments
 (0)