API reference › @evolu/common › Test › testWaitForMacrotask
function testWaitForMacrotask(duration?: Duration): Promise<void>;
Defined in: packages/common/src/Test.ts:160
Returns a Promise that resolves after a macrotask delay.
Use this to model a real async boundary in a test double, for example an async disposer that should not complete in the same turn.
Avoid using it to coordinate assertions. Waiting for a macrotask tends to make tests indirect and brittle.