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