Skip to content

frontend


Function: waitForCondition()

waitForCondition(condition, timeout?): Promise\<void>

Defined in: src/test/test-utils.tsx:162

Wait for a condition to be true

Alternative to waitFor that's more flexible.

Parameters

condition

() => boolean

timeout?

number = 1000

Returns

Promise\<void>

Example

await waitForCondition(() => mockFn.mock.calls.length > 0);