Vitest · Method
vi.waitUntil
vi.waitUntil polls a callback until it returns a truthy value. It fails immediately when the callback throws and resolves with the successful value.
Last updated
Syntax
function waitUntil<T>(callback: WaitUntilCallback<T>, options?: number | WaitUntilOptions): Promise<T>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
vi.waitForexpect.pollvi.useFakeTimerspage.locatorexpect.element