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/bail.md.
close
  • English
  • bail

    • Type: number
    • Default: 0
    • CLI: --bail [number] (default: 1)

    Abort the test run after the specified number of test failures. This is useful for stopping test runs early when failures occur.

    Setting this to 0 (the default) means to run all tests regardless of failures. Setting this to 1 will stop the test run after the first test failure.

    CLI
    rstest.config.ts
    npx rstest --bail 1