Repository navigation
chore: add a test coverage report - #233
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm test:coverageruns the Vitest suite with the V8 coverage provider and reports coverage forsrc/. It prints a per-file table and writes an HTML report tocoverage/index.html, which Git, Prettier, and ESLint already ignore.On main, the suite covers 89.68% of lines in
src/:utm.tsparameters.tsplugin.tsoptions.tscomposables.tsThe numbers count only code that runs inside the Vitest process: the unit tests, and the module setup that runs while fixtures build. Code the browser integration tests exercise in the page or in the fixture's Nuxt server isn't counted, which is why
composables.tsshows 0% even though the integration tests calluseNuxtUTM(). CONTRIBUTING explains how to read the report.@vitest/coverage-v8must match the installed Vitest version exactly, so a new Dependabot group updatesvitestand@vitest/*together instead of in separate PRs that would leave them mismatched. The command is opt-in for now. CI runspnpm testas before, and no coverage threshold is enforced.Validation:
pnpm test:coverage(128 tests),pnpm format:check, andpnpm lint --max-warnings 0with a generatedcoverage/folder present pass.