Skip to content

Enforce test coverage thresholds in CI #134

@i-afaqrashid

Description

@i-afaqrashid

Summary

Add V8 coverage to the vitest run and enforce minimum thresholds so coverage can't silently regress.

Why

The packages are already well covered, but nothing guards that. A threshold gate in pnpm verify (which CI runs) keeps coverage from drifting down as the code grows.

Scope

  • Add @vitest/coverage-v8 and a test:coverage script.
  • Configure coverage over packages/core/src and packages/react/src, excluding test files.
  • Set thresholds a few points below current coverage as a safe floor (statements/lines 95, functions 95, branches 90).
  • Run coverage as part of verify so the gate applies locally and in CI.

Acceptance

  • pnpm test:coverage enforces the thresholds and passes at current coverage.
  • pnpm verify runs coverage and passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions