# Source: https://vitest.dev/config/bail.md

---
url: /config/bail.md
---

# bail

* **Type:** `number`
* **Default:** `0`
* **CLI**: `--bail=<value>`

Stop test execution when given number of tests have failed.

By default Vitest will run all of your test cases even if some of them fail. This may not be desired for CI builds where you are only interested in 100% successful builds and would like to stop test execution as early as possible when test failures occur. The `bail` option can be used to speed up CI runs by preventing it from running more tests when failures have occurred.