You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow-up to #533: capability + coverage polish for @rangojs/router/testing #542
Follow-up to #533 (feat(testing): consumer testing primitives). The module's abstractions and core capabilities are validated (4-lens usefulness review: medium-high, "ship it"; the high-value core runs real router internals). #533 ships the message + limits (test-pyramid framing + a complete "deliberately don't cover" trap table). This issue tracks the capability + coverage polish — turning documented false-confidence traps into loud failures, and closing the biggest capability gap — so a misleading test errors instead of passing green.
1. Make silent false-confidence traps fail loud (not just documented)
These currently pass green while proving nothing:
renderRoute navigation frozen at idle — navigate() bypasses the lifecycle, so useNavigation/useLinkStatus/useAction non-idle states are invisible. Warn/throw when a test relies on a non-idle state.
"use cache" run without a seeded cacheStore — registerCachedFunction bypasses, silently exercising the uncached path. Emit a warning that the cached path is not being tested.
Flight getRequestContext()/cookies() alias trap — without the rsc-project rangoTestAliases, a context-reading handler hits the throwing stub and surfaces as opaque tree: undefined. Detect this and emit an actionable "add rangoTestAliases to your rsc project" error.
renderRoute wrong mount prefix — runtime-silent; validate the prefix against the routes.
2. Close the biggest capability gap
Full-app router import in bare tests — a router using Prerender()/createLoader() throws "missing $$id" (plugin-injected at build). Either support injected ids in bare tests, OR promote the Prerender-free-include recipe to the canonical quickstart dispatch/assertGeneratedRoutesMatch pattern (it is documented but mid-doc).
3. Trim / de-emphasize marginal surface
Steer users to renderServerTree (inspect props/boundaries) over raw renderToFlightString wire-string matchers for assertions.
Consolidate the dual cache-telemetry paths (parseCacheHeader/assertCacheStatus vs createCacheSink/filterCacheDecisions).
Activity
fix(testing): gate the $$id fallback on VITEST, not NODE_ENV (restore…
fix(testing): runtime-safe test-runner check + keep the rich $$id dia…
feat(testing): loud-fail the alias trap + bare-import Prerender/creat…
feat(testing): #542 capability + coverage polish for @rangojs/router/…