Skip to content

fix: add Vitest coverage config for issue #396#418

Merged
codeZe-us merged 2 commits intoSafeVault:mainfrom
ryzen-xp:fix/add-Vitest-coverage-config-for-issue
Mar 29, 2026
Merged

fix: add Vitest coverage config for issue #396#418
codeZe-us merged 2 commits intoSafeVault:mainfrom
ryzen-xp:fix/add-Vitest-coverage-config-for-issue

Conversation

@ryzen-xp
Copy link
Copy Markdown
Contributor

@ryzen-xp ryzen-xp commented Mar 29, 2026

Summary

Added coverage reporting support to Vitest to improve backend reliability tracking and make test coverage transparent.

  • Configured vitest.config.ts to enable coverage with v8 provider.
  • Set output reporter to html and text-summary.
  • Set coverage output directory to coverage.
  • Excluded structural/type-only files and test files from coverage counting.
  • Added npm script test:coverage to run vitest run --coverage.
  • Added dependency @vitest/coverage-v8 to devDependencies.

Type of Change

  • Feature
  • Bug Fix
  • Refactoring
  • Documentation
  • Tests
  • Infrastructure / CI

Linked Issues

Key Changes

  • vitest.config.ts
    • test.coverage section:
      • provider: "v8"
      • reporter: ["html", "text-summary"]
      • reportsDirectory: "coverage"
      • all: true, clean: true
      • exclude for index files, *.d.ts, *.type.ts, *.types.ts, and tests.
  • package.json
    • new script:
      • "test:coverage": "vitest run --coverage"
  • Added @vitest/coverage-v8 to devDependencies.
  • Verified command execution: pnpm test:coverage runs tests and produces HTML report under /coverage/index.html.

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new linting/type-checking warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the documentation accordingly.

Screenshots / Recordings

  • Generated coverage/index.html from pnpm test:coverage (manual local verification).
  • No screenshot included in this text response.

@ryzen-xp
Copy link
Copy Markdown
Contributor Author

hello @codeZe-us , Please Review This PR .

Thank U !!

@codeZe-us codeZe-us self-requested a review March 29, 2026 20:29
@codeZe-us codeZe-us merged commit deaa743 into SafeVault:main Mar 29, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add coverage reporting to Vitest config

2 participants