Code Coverage Threshold - CI/CD Glossary Definition
A code coverage threshold is a minimum coverage percentage the test suite must meet, enforced in CI so a build fails if coverage drops below the configured bar.
How it is set
In Jest you configure coverageThreshold with per-metric minimums (statements, branches, functions, lines). Tools like Codecov can fail a PR if it lowers coverage compared to the base branch.
Use it carefully
A hard threshold prevents backsliding but can encourage low-value tests written just to hit the number. Pair it with branch coverage and, ideally, a mutation score to measure real assertion quality.
Related guides
Branch Coverage - CI/CD Glossary DefinitionBranch Coverage: Branch coverage measures the percentage of decision branches (each side of every `if`, `swit…
Mutation Score - CI/CD Glossary DefinitionMutation Score: A mutation score is the percentage of injected code mutations (deliberate bugs) that a test s…
Smoke Test - CI/CD Glossary DefinitionSmoke Test: A smoke test is a small, fast check that verifies the most critical paths work at all, run right…