Skip to content

test(coverage): N-Z pages + api/index.ts + hooks to >=95%#132

Merged
mastermanas805 merged 1 commit into
mainfrom
coverage/web-pages-b-95
May 22, 2026
Merged

test(coverage): N-Z pages + api/index.ts + hooks to >=95%#132
mastermanas805 merged 1 commit into
mainfrom
coverage/web-pages-b-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

Pages Batch B coverage push. Drives all owned files (page filenames N-Z, plus src/api/index.ts and src/hooks/) to >=95% line coverage.

  • New unit/render tests for the previously 0%-covered static pages: NotFound, Privacy, Security/LegalDoc, Terms, UseCases, UseCaseDetail.
  • SettingsPage (PAT create/revoke + one-time-token banner + deploy-TTL policy card), VaultPage (reveal/hide, env tabs, new-env), TeamPage and ResourcesPage component renders, ResourceDetailPage branch supplement.
  • useDashboardCtx singleton store (bootstrap, setEnv/addEnv, billing/counts fan-out, reset).
  • ~66 api/index.ts endpoint-wrapper cases via a mocked-fetch seam (status/team/resource/stack/deletion/TTL/custom-domain/billing/vault/activity/PAT wrappers, plus error + fallback branches).
  • Adds @vitest/coverage-v8 devDependency so per-file coverage can be measured.

Owned-file line coverage after this change (all >=95%): index.ts 97.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 gate green (tsc --noEmit + build incl. prerender + vitest): 907 passed, 3 skipped, 0 failed across 59 files.
  • Scoped coverage run confirms every owned file >=95% lines.

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/assets/index-BwyF-Dau.js 143.87 KB (0%)
dist/assets/index-C9T0ot61.css 6.19 KB (0%)

@mastermanas805 mastermanas805 merged commit 8abb105 into main May 22, 2026
13 checks passed
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>
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.

2 participants