test(coverage): N-Z pages + api/index.ts + hooks to >=95%#132
Merged
Conversation
Pages-batch-B coverage push (filenames N-Z plus src/api/index.ts and src/hooks). Adds render/unit tests for the previously-uncovered static pages (NotFound/Privacy/Security/Terms/UseCases/UseCaseDetail), the SettingsPage PAT + deploy-TTL flows, VaultPage, the TeamPage and ResourcesPage component renders, the ResourceDetailPage branch supplement, the useDashboardCtx singleton store, and ~66 api/index.ts endpoint-wrapper cases via a mocked-fetch seam. Adds @vitest/coverage-v8 so per-file coverage can be measured. npm run gate green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
mastermanas805
pushed a commit
that referenced
this pull request
May 22, 2026
Adds diff-cover patch-coverage enforcement: every changed line in a PR must be covered by a test (--fail-under=100 vs origin/main). vitest's v8 coverage provider emits lcov with src/*.ts(x) paths + source-mapped line numbers, so it lines up directly with the PR diff. @vitest/coverage-v8 is already a devDependency on main (#132), so this PR only adds the workflow gate. `npm run gate` untouched. New org mandate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mastermanas805
added a commit
that referenced
this pull request
May 22, 2026
Adds diff-cover patch-coverage enforcement: every changed line in a PR must be covered by a test (--fail-under=100 vs origin/main). vitest's v8 coverage provider emits lcov with src/*.ts(x) paths + source-mapped line numbers, so it lines up directly with the PR diff. @vitest/coverage-v8 is already a devDependency on main (#132), so this PR only adds the workflow gate. `npm run gate` untouched. New org mandate. Co-authored-by: Claude <noreply@anthropic.com>
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.
Summary
Pages Batch B coverage push. Drives all owned files (page filenames N-Z, plus
src/api/index.tsandsrc/hooks/) to >=95% line coverage.useDashboardCtxsingleton store (bootstrap, setEnv/addEnv, billing/counts fan-out, reset).api/index.tsendpoint-wrapper cases via a mocked-fetchseam (status/team/resource/stack/deletion/TTL/custom-domain/billing/vault/activity/PAT wrappers, plus error + fallback branches).@vitest/coverage-v8devDependency so per-file coverage can be measured.Owned-file line coverage after this change (all >=95%):
index.ts97.96, NotFound/Privacy/Security/Terms/UseCases/UseCaseDetail/Team/Resources/Vault 100, ResourceDetail 98.95, Settings 98.89, Overview 98.86, Status 97.94, Pricing 95.8, StackCreate 95.0.Test plan
npm run gategreen (tsc --noEmit + build incl. prerender + vitest): 907 passed, 3 skipped, 0 failed across 59 files.🤖 Generated with Claude Code