Skip to content

Install the coverage provider and add a coverage script #17

Description

@priscaenoch

Problem

vitest.config.ts configures coverage with provider: 'v8' and thresholds of 80% for statements, branches, functions, and lines. However @vitest/coverage-v8 is not present in devDependencies, and package.json has no coverage script. Running coverage today fails because the provider is not installed, so the configured thresholds are never enforced and are effectively dead configuration.

What needs to be done

  • Add @vitest/coverage-v8 to devDependencies at a version matching the installed Vitest.
  • Add a test:coverage script (for example vitest run --coverage).
  • Run coverage and confirm the report is produced.
  • The configured 80% thresholds will likely fail against current coverage. Either lower the thresholds to a realistic starting baseline and raise them over time, or scope thresholds to well-covered directories. Document the decision in the PR.

Files

  • package.json
  • vitest.config.ts

Acceptance deliverables

  • npm run test:coverage runs and emits text/json/html reports.
  • Thresholds reflect a baseline the suite actually meets, so the command is usable in CI.

Tests to pass

  • npm run test:coverage exits successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions