declare global { var ORG_setTimeout: typeof setTimeout | undefined; var ORG_setInterval: typeof setInterval | undefined; } /** * Makes React Testing Library's async utilities (`waitFor`, `findBy*`, * `waitForElementToBeRemoved`) poll in real wall-clock time even though * `setupTimeAndLanguage` collapses the global `setTimeout`/`setInterval` to fire * at 0ms. * * Every RTL async utility funnels through the configurable `asyncWrapper`: * `@testing-library/react` installs an `act`-based one on import, and * `@testing-library/dom`'s `waitFor` — plus `findBy*` and * `waitForElementToBeRemoved`, which build on the module-internal `waitFor` — * run their poll/timeout loop inside it. We decorate that single seam: for the * duration of each async-utility call we temporarily restore the real timers * (`globalThis.ORG_setTimeout`/`ORG_setInterval`), then put the collapsed 0ms * timers back in a `finally`. Timers stay instant everywhere else, so debounces * and animations still resolve immediately and the suite does not slow down. * * Guards: * - Delegates unchanged when fake timers are active (`vi.isFakeTimers()`), so * opt-in fake-timer tests keep RTL's fake-timer path. * - No-ops the timer swap when `ORG_setTimeout` is absent (projects that don't * collapse timers), leaving behaviour unchanged there. * - Idempotent: repeated calls don't stack decorators. * * Must run after RTL's `act` wrapper is installed, i.e. from * `setupReactTestingLibrary()`. */ export declare const configureReliableAsyncUtils: () => void;