Skip to content

vitest/coverage

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

Part of the vitest configuration, at the recommended level. It runs at the push stage, once per scope. It runs vitest.

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

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

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

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

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