# vitest/coverage

> Runs the test suite with coverage, and fails when lines, branches, functions, or statements fall under their floors.

Runs the test suite with coverage, and fails when lines, branches, functions, or statements fall under their floors.

Part of the [`vitest`](/reference/configurations/vitest/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `push` [stage](/start/concepts/#stage), once per scope. It runs vitest.

## Why

A floor makes new code arrive with tests, when its behavior costs least to check.

## What to do

Add tests for the lines the report marks, or lower one floor under `coverage` with a reason.

## Example

Vitest reports `ERROR: Coverage for lines (85%) does not meet global threshold (90%)`. Add tests for the uncovered lines.

## Turn it off

Turn it off for some files, or one of its lint rules, with a reason:

```shell
gspot ignore vitest/coverage --paths "<glob>" --reason "<why>"
gspot ignore vitest/coverage --rule <rule> --reason "<why>"
```
