Runtime
Bundler
Package Manager
Test Runner
Guides
Reference
Blog
Install Bun
Guides Test Runner

Bail early with the Bun test runner

Use the --bail flag to abort a test run after the first failure, so a continuous integration run fails as early as possible.

terminal
$ bun test --bail

To bail after a certain number of failures, pass a number after the flag.

terminal
# bail after 10 failures
$ bun test --bail=10

See bun test.

On this page

No Headings