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 {
241241 isReturnStatement ( node . parent )
242242 )
243243 return true ;
244- if ( hasClosestExpectResolvesRejects ( node . parent ) ) return true ;
244+ if ( hasClosestExpectHandlesPromise ( node . parent ) ) return true ;
245245 if ( hasChainedThen ( node ) ) return true ;
246246 if ( isPromisesArrayResolved ( node ) ) return true ;
247247 } ) ;
@@ -534,12 +534,12 @@ const matcherNamesHandlePromise = [
534534] ;
535535
536536/**
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
541541 */
542- export function hasClosestExpectResolvesRejects ( node : TSESTree . Node ) : boolean {
542+ export function hasClosestExpectHandlesPromise ( node : TSESTree . Node ) : boolean {
543543 if (
544544 isCallExpression ( node ) &&
545545 ASTUtils . isIdentifier ( node . callee ) &&
@@ -558,7 +558,7 @@ export function hasClosestExpectResolvesRejects(node: TSESTree.Node): boolean {
558558 return false ;
559559 }
560560
561- return hasClosestExpectResolvesRejects ( node . parent ) ;
561+ return hasClosestExpectHandlesPromise ( node . parent ) ;
562562}
563563
564564/**
You can’t perform that action at this time.
0 commit comments