For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /config/test/expect.md.
close
  • English
  • expect

    • Type: ExpectConfig
    • Default: { poll: { interval: 50, timeout: 1000 } }

    Configure the defaults used by expect.poll(). Options passed directly to expect.poll() take precedence over this configuration.

    rstest.config.ts
    import { defineConfig } from '@rstest/core';
    
    export default defineConfig({
      expect: {
        poll: {
          interval: 100,
          timeout: 5000,
        },
      },
    });

    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

    The maximum total polling time before the assertion fails, in milliseconds.