expect
- Type:
ExpectConfig - Default:
{ poll: { interval: 50, timeout: 1000 } }(timeout: 5000in Browser Mode)
Configure the defaults used by expect.poll(). Browser Mode uses a 5000ms default poll timeout, while Node Mode uses 1000ms. An implicit default is limited by the remaining current test phase; options passed directly to expect.poll() take precedence and are not capped by this calculation. expect.poll() remains test-only: it can use the active timeout of per-test hooks and fixtures, but it is not available in beforeAll or afterAll.
rstest.config.ts
expect.poll
Global configuration for polling assertions.
expect.poll.interval
- Type:
number - Default:
50
The interval between retry attempts, in milliseconds.
expect.poll.timeout
- Type:
number - Default:
1000(5000in Browser Mode)
The maximum total polling time before the assertion fails, in milliseconds. When omitted at the call site, the configured value is also capped by the remaining current test phase.