File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ export function isPromiseHandled(nodeIdentifier: TSESTree.Identifier): boolean {
241
241
isReturnStatement ( node . parent )
242
242
)
243
243
return true ;
244
- if ( hasClosestExpectResolvesRejects ( node . parent ) ) return true ;
244
+ if ( hasClosestExpectHandlesPromise ( node . parent ) ) return true ;
245
245
if ( hasChainedThen ( node ) ) return true ;
246
246
if ( isPromisesArrayResolved ( node ) ) return true ;
247
247
} ) ;
@@ -534,12 +534,12 @@ const matcherNamesHandlePromise = [
534
534
] ;
535
535
536
536
/**
537
- * Determines whether a node belongs to an async assertion
538
- * fulfilled by `resolves` or `rejects` properties or
539
- * by `toResolve` or `toReject` jest-extended matchers
540
- *
537
+ * Determines whether a node belongs to an async assertion that is fulfilled by:
538
+ * - `resolves` or `rejects` properties
539
+ * - `toResolve` or `toReject` jest-extended matchers
540
+ * - jasmine async matchers
541
541
*/
542
- export function hasClosestExpectResolvesRejects ( node : TSESTree . Node ) : boolean {
542
+ export function hasClosestExpectHandlesPromise ( node : TSESTree . Node ) : boolean {
543
543
if (
544
544
isCallExpression ( node ) &&
545
545
ASTUtils . isIdentifier ( node . callee ) &&
@@ -558,7 +558,7 @@ export function hasClosestExpectResolvesRejects(node: TSESTree.Node): boolean {
558
558
return false ;
559
559
}
560
560
561
- return hasClosestExpectResolvesRejects ( node . parent ) ;
561
+ return hasClosestExpectHandlesPromise ( node . parent ) ;
562
562
}
563
563
564
564
/**
You can’t perform that action at this time.
0 commit comments