chore(vitest): include src/pages/api in the coverage report - #37
Merged
Conversation
`coverage.include` listed only src/lib/** and src/components/**, so the entire src/pages/api tree was absent from the coverage report — not reported as 0%, just missing. That is how "the tests protect the money-path routes" survived as an assertion in this project while Stripe checkout and webhook had no tests at all: nothing in the report could contradict it. An untested route should show up as a zero, not as a blank space. With API routes in scope the report now lists 66 handler rows, 39 of them at 0% coverage. That reconciles with the 44-untested baseline measured on 2026-08-25 minus the 5 covered since by PR #34 (checkout, webhook) and PR #35 (bball/setup, ai-gateway, generate-profile). Config only — no test or source changes. 71 files / 818 tests still passing. Claude-Session: https://claude.ai/code/session_012mnCNNcQcq3xuyHK8hwDQP
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Livelihood stream: Consulting funnel — the money-path routes are the ones this makes visible.
One line, plus a comment explaining why it matters.
The problem
coverage.includelisted onlysrc/lib/**andsrc/components/**, so the entiresrc/pages/apitree was absent from the coverage report — not reported as 0%, just missing.That is precisely how "the tests protect the money-path routes" survived as an assertion in this project while Stripe checkout and webhook had zero tests: nothing in the report was ever going to contradict it. A metric that cannot show a failure is not a metric.
An untested route should show up as a zero, not as a blank space.
Effect
The report now lists 66 API handler rows, 39 of them at 0%.
That number reconciles: the 08-25 baseline measured 44 untested handlers, and 5 have been covered since — checkout and webhook in #34,
bball/setup/ai-gateway/generate-profilein #35. 44 − 5 = 39. Two independently derived counts agreeing is a decent sign the instrument is now reading correctly.Aggregate across everything in scope is now
38%statements — a real number to move, where before there was no number at all for this tree.Verification (real output, base
da66d0e)Config only — no test or source changes, so the suite is unchanged by design. The point of this PR is that the report stops hiding things, not that anything got better.
https://claude.ai/code/session_012mnCNNcQcq3xuyHK8hwDQP