# vitest

> Vitest suites: test lint rules and coverage floors before every push.

Vitest suites: test lint rules and coverage floors before every push. It requires [`javascript`](/reference/configurations/javascript/). The [Tests and coverage guide](/checks/testing/) explains the setup.

## Checks

| Check                                                   | Stage  | Level         | What it does                                                                                                         |
| ------------------------------------------------------- | ------ | ------------- | -------------------------------------------------------------------------------------------------------------------- |
| [`vitest/coverage`](/reference/checks/vitest/coverage/) | `push` | `recommended` | Runs the test suite with coverage, and fails when lines, branches, functions, or statements fall under their floors. |

## Settings

| Setting                                                             | What it sets                                                  |
| ------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`coverage.lines`](/reference/gspot-toml/#coverage.lines)           | The minimum percentage of source lines covered by tests.      |
| [`coverage.branches`](/reference/gspot-toml/#coverage.branches)     | The minimum percentage of source branches covered by tests.   |
| [`coverage.functions`](/reference/gspot-toml/#coverage.functions)   | The minimum percentage of source functions covered by tests.  |
| [`coverage.statements`](/reference/gspot-toml/#coverage.statements) | The minimum percentage of source statements covered by tests. |

## Selected when

gspot selects it in a scope with dependencies `vitest`.

## Rules for coding agents

| Rule file                                              | Installed when |
| ------------------------------------------------------ | -------------- |
| `.gspot/configurations/testing/vitest/rules/VITEST.md` | Always         |

## Tools and versions

| Tool                  | Version |
| --------------------- | ------- |
| vitest                | Any     |
| @vitest/eslint-plugin | `1.3.4` |
| @vitest/coverage-v8   | Any     |
