Skip to content

test: raise line-coverage floor to 95% - #77

Merged
LeandrodaSilva merged 1 commit into
mainfrom
claude/project-next-steps-pijP2
Jun 7, 2026
Merged

LeandrodaSilva merged 1 commit into
mainfrom
claude/project-next-steps-pijP2

Conversation

@LeandrodaSilva

Copy link
Copy Markdown
Owner

Summary

Closes the remaining test gaps and ratchets the CI line-coverage floor from 90% → 95%. Measured line coverage is now ~95.1% (4025/4231), up from 90.65%. Test-only + CI/docs changes — no production source behavior changes.

Coverage added

  • ten.ts (72% → 97%): public delegators (use/onError/setRenderer/onRequest/onResponse/events/sitemap/robots/fetch), runtime SEO env defaults, Ten.build, useAdmin sitemap provider, internal accessors, graceful-shutdown error branches, dev-watcher terminate, file-watcher error, embedded constructor, plus a live (uncompiled) server E2E exercising the real start → Deno.serve → fetch path.
  • Build pipeline: bundle-warning path in build.ts, collector layout collection, bundleRoutes failure path, buildCommand --version/--help/exit, BuildReporter edge.
  • i18n: renderSelector / renderSelectorFromTemplate / findSelectorTemplate, resolveLocale + applyTranslations edges, dn.of fallback.
  • Misc: viewEngine invalid-data errors; sw/adapter pathPrefix + fallback branches; storage sync (!ok, idempotent start, lastSync); IndexedDB open error + IndexedDBKv.close; node adapter undefined/array headers + double-signal; transpileRoute comment-strip + type-only; compareRoutePaths tie-break; waitForServer not-ready branch.

What's intentionally left uncovered

Concentrated in code that can't run in the test sandbox:

  • src/build/build.ts binary-compile (deno compile fails with @std/encoding not a dependency — the same reason the binary E2E is ignore: true) and the Service-Worker esbuild self-bundle (@leproj/tennet/core subpath can't resolve).
  • src/tailwind/generator.ts environment-specific import.meta.resolve fallbacks.
  • A handful of defensive catch clauses.

Verification

  • deno fmt / deno lint / deno task check clean.
  • Full suite: 169 passed, 0 failed, 1 ignored.
  • CI gate raised to MIN_COVERAGE: "95"; simulated locally → 95.1% ≥ 95% → PASS (~8 lines of margin).
  • docs/coverage-plan.md and CLAUDE.md updated to the 95% floor.

https://claude.ai/code/session_015AsggMbqEhejVYtbq1LubN


Generated by Claude Code

Add focused tests for the previously under-covered reachable code and
ratchet the CI coverage gate from 90% to 95% (line coverage ~95.1%).

New/extended coverage:
- ten.ts: public delegators, runtime SEO env defaults, Ten.build, useAdmin
  sitemap provider, internal accessors, graceful-shutdown error branches,
  dev-watcher terminate, file-watcher error, embedded constructor, and a
  live (uncompiled) server E2E exercising the real start -> Deno.serve path.
- build pipeline: bundle-warning path, collector layouts, bundleRoutes
  failure, buildCommand --version/--help/exit, BuildReporter edge.
- i18n: renderSelector / renderSelectorFromTemplate / findSelectorTemplate,
  resolveLocale + applyTranslations edges, dn.of fallback.
- viewEngine invalid-data errors; sw/adapter pathPrefix + fallback branches;
  storage sync (!ok, idempotent start, lastSync); IndexedDB open error +
  IndexedDBKv close; node adapter undefined/array headers + double-signal;
  transpileRoute comment-strip + type-only; compareRoutePaths tie-break;
  waitForServer not-ready branch.

Remaining uncovered code is concentrated in the binary/SW build pipeline
(deno compile / esbuild self-bundling, which cannot run in the test sandbox)
and a few defensive catch clauses. Docs/roadmap updated to the 95% floor.

https://claude.ai/code/session_015AsggMbqEhejVYtbq1LubN
@LeandrodaSilva
LeandrodaSilva merged commit 065e380 into main Jun 7, 2026
6 checks passed
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