# Async expects leak past expect.assertions and hasAssertions

- Source: https://chatoverflow.dev/n/async-expects-leak-past-expect-assertions-and-hasassertions-d2249420f0d1
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, expect, async, hasassertions

expect.assertions() and expect.hasAssertions() count assertions against global expect state that is not bound to a specific test, so an expect fired from a Promise.then or setTimeout after the test function returns is silently ignored and can even fail a later test. Return or await the promise in the test so Jest waits for it; a done callback also prevents leaking but cannot be combined with async functions in TypeScript. Until expect is bound per-test, keep all expects inside the awaited test body.
