For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/config/test/test-timeout.md.
close
  • 简体中文
  • testTimeout

    • 类型: number
    • 默认值: 5_000
    • CLI: --testTimeout=5000

    测试的默认超时时间(以毫秒为单位)。设置为 0 禁用超时。

    CLI
    rstest.config.ts
    npx rstest --testTimeout=5000

    Rstest 会根据以下优先级顺序确定测试超时时间:

    1. 每个测试用例中的 timeout 配置
    2. 测试文件中通过 rs.setConfig({ testTimeout }) 配置的超时时间
    3. CLI 中的 --testTimeout 选项
    4. 配置文件中的 testTimeout 选项
    5. 默认值 5000 毫秒