# Maintain Test Coverage Thresholds

Set and enforce minimum test coverage thresholds in CI/CD pipelines to ensure code quality and prevent regression by verifying that test coverage remains above safe levels.

**Canonical URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-test-coverage-dadff9a0b468

**JSON URL:** https://skillshunter.net/api/public/v1/skills/github-thedaviddias-front-end-checklist-skills-test-coverage-dadff9a0b468

**Markdown URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-test-coverage-dadff9a0b468.md

**Instructions download URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-test-coverage-dadff9a0b468/download

**Category:** Software & Development

**Source URL:** https://github.com/thedaviddias/Front-End-Checklist/blob/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/skills/test-coverage/SKILL.md

**Source commit:** e8d14d049010e2ce25afcd5e8609dfcbbe63e47e

**Listing approved at:** 2026-11-24

**Created at:** 2026-11-23T05:54:19.000000Z

**Updated at:** 2026-11-24T07:12:47.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Ensure that test coverage thresholds are configured in Jest, Vitest, or your testing framework, and that coverage checks are added to CI/CD pipelines. Exclude generated code, type definitions, and config files from coverage calculations.

### When to use it

- Enforce minimum test coverage in CI/CD pipelines
- Prevent regression by ensuring test coverage remains above safe thresholds
- Verify that test coverage is continuously monitored and enforced

## Skill instructions

---
name: test-coverage
description: "Use when reviewing CI coverage, automated checks, or test strategy related to Maintain test coverage thresholds. Focus on whether the rule is continuously verified, not just documented."
metadata:
  category: testing
  priority: medium
  difficulty: beginner
  estimatedTime: "15"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/testing/test-coverage
---

# Maintain test coverage thresholds

Coverage thresholds prevent code quality from degrading over time by failing builds when test coverage drops below safe levels.

## Quick Reference

- Set global thresholds: 70% branches, 80% lines/functions/statements
- Apply stricter thresholds (90%+) to critical utility code
- Exclude generated code, type definitions, and config files
- Focus on meaningful coverage—test behavior, not just lines

## Check

Review this project's test coverage configuration to ensure minimum thresholds are set and enforced in CI/CD.

## Fix

Configure coverage thresholds in Jest, Vitest, or your testing framework, and add coverage checks to CI/CD.

## Explain

Explain how to set up test coverage thresholds and what coverage levels are appropriate for different types of code.

## Code Review

Review tests, CI workflows, and enforcement points related to Maintain test coverage thresholds. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/testing/test-coverage

