jest/coverage
Runs Jest and checks all four coverage floors.
Part of the jest configuration, at the recommended level. It runs at the push stage, once per scope. It runs jest.
A coverage floor keeps new code from arriving untested.
What to do
Section titled “What to do”Correct failed tests and cover the reported branches, functions, lines, and statements.
Example
Section titled “Example”Jest reports coverage threshold for lines (90%) not met: 85%. Add tests for the lines its report marks uncovered.
Turn it off
Section titled “Turn it off”Turn it off for some files, or one of its lint rules, with a reason:
gspot ignore jest/coverage --paths "<glob>" --reason "<why>"gspot ignore jest/coverage --rule <rule> --reason "<why>"