nestjs-vitest-coverage

Enforce Vitest coverage thresholds and remediate test gaps in NestJS backends.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/cromesdk/ai-skills --skill nestjs-vitest-coverage
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nestjs-vitest-coverage
Source: https://github.com/cromesdk/ai-skills/tree/main/skills/nestjs/nestjs-vitest-coverage
Command: npx skills add https://github.com/cromesdk/ai-skills --skill nestjs-vitest-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures reliable and enforceable Vitest code coverage in NestJS projects, preventing coverage drift and maintaining code quality standards.

Core Features & Use Cases

  • Upgrade and Repair: Updates Vitest and coverage packages to the latest versions, resolving compatibility issues.
  • Configuration Hardening: Configures Vitest coverage settings, including reporters, include/exclude patterns, and thresholds.
  • Threshold Enforcement: Sets and enforces minimum coverage thresholds for lines, functions, branches, and statements.
  • Test Gap Remediation: Guides the improvement of tests to cover uncovered code, rather than excluding source files.
  • Use Case: When your CI pipeline fails due to low test coverage after a framework upgrade, or when you need to establish strict coverage gates for your NestJS backend.

Quick Start

Use the nestjs-vitest-coverage skill to upgrade Vitest packages and enforce coverage thresholds in your NestJS project.

Frequently Asked Questions about nestjs-vitest-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Vitest coverage thresholds in a NestJS backend?▼

You can enforce Vitest coverage thresholds by configuring minimum coverage gates for lines, functions, branches, and statements. This hardens configuration and ensures CI pipelines fail when code coverage drops below defined standards.

Why does my Vitest coverage fail in CI after a framework upgrade?▼

Vitest coverage fails in CI after a framework upgrade due to compatibility issues between coverage providers. Repairing the setup involves updating Vitest and coverage packages to the latest versions and normalizing scripts to align provider configurations.

What is the best way to migrate coverage providers in Vitest?▼

The best way to migrate coverage providers in Vitest is to update and align provider packages, such as transitioning between v8 and istanbul. This repair process hardens configuration and normalizes reporters to ensure accurate coverage tracking.

How do I configure Vitest coverage reporters and include patterns for NestJS?▼

Configuring Vitest coverage reporters and include or exclude patterns for NestJS involves hardening the Vitest configuration. This setup accurately tracks code coverage across source files while preventing coverage drift in backend modules.

Should I exclude untested source files to meet Vitest coverage thresholds?▼

You should not exclude untested source files to meet Vitest coverage thresholds. Instead of excluding source files, the recommended approach is test gap remediation, which guides the improvement of tests to actually cover the uncovered code.

Can I prevent coverage drift in NestJS without manually checking every PR?▼

You can prevent coverage drift in NestJS without manual checks by enforcing strict Vitest coverage thresholds within your CI pipeline. Setting minimum gates for lines, functions, branches, and statements automates quality enforcement on every push.