AntiPattern

Async Mocks Misaligned Lifecycles

async-mock-lifecycle-misalignment

Async coroutine lifecycles get misaligned with mocks and test harnesses, so async context managers don’t receive objects with aenter/aexit, awaited return values get double-wrapped, and route-scoped metadata appears before routing. Tests and handlers then fail unpredictably.