Skip to content

chore(vitest): include src/pages/api in the coverage report - #37

Merged
brooksRoley merged 1 commit into
mainfrom
chore/coverage-include-api-routes
Aug 25, 2026
Merged

chore(vitest): include src/pages/api in the coverage report#37
brooksRoley merged 1 commit into
mainfrom
chore/coverage-include-api-routes

Conversation

@brooksRoley

Copy link
Copy Markdown
Owner

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.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 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

include: ['src/lib/**', 'src/components/**', 'src/pages/api/**'],

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-profile in #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)

Test Files  71 passed (71)
     Tests  818 passed (818)
yarn lint   clean, 0 warnings
tsc         clean

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

`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
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zero-next Ready Ready Preview Aug 25, 2026 7:50pm

@brooksRoley
brooksRoley merged commit bba258a into main Aug 25, 2026
4 checks passed
@brooksRoley
brooksRoley deleted the chore/coverage-include-api-routes branch August 25, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant