# Bun Bail early with the Bun test runner

> Bail early with the Bun test runner

- Skill: `jarle/bun-bail-early-with-the-bun-test-runner` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jarle/bun-bail-early-with-the-bun-test-runner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jarle/bun-bail-early-with-the-bun-test-runner/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jarle (https://skillmd.com/u/jarle)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jarle/bun-bail-early-with-the-bun-test-runner

---


# Bail early with the Bun test runner

Use the `--bail` flag to bail on a test run after a single failure. This is useful for aborting as soon as possible in a continuous integration environment.

```sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun test --bail
```

***

To bail after a certain threshold of failures, optionally specify a number after the flag.

```sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
# bail after 10 failures
bun test --bail=10
```

***

See [Docs > Test runner](/test) for complete documentation of `bun test`.

