Repository navigation
test: raise line-coverage floor to 95% - #77
Merged
Merged
Conversation
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
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
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,useAdminsitemap provider, internal accessors, graceful-shutdown error branches, dev-watcher terminate, file-watcher error, embedded constructor, plus a live (uncompiled) server E2E exercising the realstart → Deno.serve → fetchpath.build.ts, collector layout collection,bundleRoutesfailure path,buildCommand --version/--help/exit,BuildReporteredge.renderSelector/renderSelectorFromTemplate/findSelectorTemplate,resolveLocale+applyTranslationsedges,dn.offallback.viewEngineinvalid-data errors;sw/adapterpathPrefix + fallback branches; storage sync (!ok, idempotentstart,lastSync); IndexedDB open error +IndexedDBKv.close; node adapter undefined/array headers + double-signal;transpileRoutecomment-strip + type-only;compareRoutePathstie-break;waitForServernot-ready branch.What's intentionally left uncovered
Concentrated in code that can't run in the test sandbox:
src/build/build.tsbinary-compile (deno compilefails with@std/encoding not a dependency— the same reason the binary E2E isignore: true) and the Service-Worker esbuild self-bundle (@leproj/tennet/coresubpath can't resolve).src/tailwind/generator.tsenvironment-specificimport.meta.resolvefallbacks.catchclauses.Verification
deno fmt/deno lint/deno task checkclean.MIN_COVERAGE: "95"; simulated locally →95.1% ≥ 95% → PASS(~8 lines of margin).docs/coverage-plan.mdandCLAUDE.mdupdated to the 95% floor.https://claude.ai/code/session_015AsggMbqEhejVYtbq1LubN
Generated by Claude Code