Reference

act

Flushes updates produced by a test callback before assertions run.

Signature

function act<T>(callback: (): T): T extends PromiseLike<unknown> ? Promise<void> : void