Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Guides · Test Runner

Bail early with the Bun test runner

Stop a bun test run after the first failure, or after a given number of failures, with the --bail flag.

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

bun test --bail

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

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

See bun test.