# Testing signals — TanStack/router

> Canonical page: https://codevetter.com/unpack/router/testing-signals

# Testing signals — TanStack/router

Scanned commit 1f0f20a3206a28365d74fd2485b9a8eedbf74dd0 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Tests and CI were inspected, not executed; no passing result, coverage percentage, or benchmark outcome is asserted. The inspected suites combine Vitest, React Testing Library, type assertions, generator snapshots, and Playwright browser checks. CI definitions connect affected targets and framework benchmark matrices. The inventory and test inspection are bounded, and mocked unit boundaries do not establish deployment-level correctness.
- Router core config uses Vitest in jsdom, disables watching, enables type checking, and aliases isServer to its development implementation so tests can exercise router.isServer fallback. — [packages/router-core/vite.config.ts#L17-L35](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-core/vite.config.ts#L17-L35)
- The server-route lifecycle regression asserts beforeLoad → loader → onEnter order, onStay after a search change, and onLeave before entry into a different route. — [packages/router-core/tests/server-route-lifecycle.test.ts#L21-L46](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-core/tests/server-route-lifecycle.test.ts#L21-L46) [packages/router-core/tests/server-route-lifecycle.test.ts#L48-L75](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-core/tests/server-route-lifecycle.test.ts#L48-L75)
- React render-owner tests use React Testing Library and controlled suspension to assert that a superseded publication cannot acknowledge its successor or emit an obsolete onRendered event. — [packages/react-router/tests/react-render-owner-contract.test.tsx#L1-L10](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/react-router/tests/react-render-owner-contract.test.tsx#L1-L10) [packages/react-router/tests/react-render-owner-contract.test.tsx#L21-L39](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/react-router/tests/react-render-owner-contract.test.tsx#L21-L39) [packages/react-router/tests/react-render-owner-contract.test.tsx#L60-L91](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/react-router/tests/react-render-owner-contract.test.tsx#L60-L91)
- routeApi.test-d.tsx uses Vitest expectTypeOf for route-specific navigation, params, context, search, and loader return types; Start server core also declares type checks across TypeScript 5.6 through 7.0 and export checks using publint/attw. — [packages/react-router/tests/routeApi.test-d.tsx#L46-L95](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/react-router/tests/routeApi.test-d.tsx#L46-L95) [packages/start-server-core/package.json#L26-L39](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/start-server-core/package.json#L26-L39)
- Generator tests enumerate fixture folders, compare generated route trees and selected transformed route files with file snapshots, and inspect absolute physical mount directories; expected-error branches catch errors without an explicit failure assertion when no error is thrown. — [packages/router-generator/tests/generator.test.ts#L309-L338](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-generator/tests/generator.test.ts#L309-L338) [packages/router-generator/tests/generator.test.ts#L357-L408](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-generator/tests/generator.test.ts#L357-L408)
- Server-function tests cover direct falsy results, JSON records, response cancellation, and request-abort cleanup, but mock the function resolver, response event, and plugin lookup; those cases do not exercise the real dispatch or middleware pipeline. — [packages/start-server-core/tests/server-functions-handler.test.ts#L20-L41](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/start-server-core/tests/server-functions-handler.test.ts#L20-L41) [packages/start-server-core/tests/server-functions-handler.test.ts#L79-L162](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/start-server-core/tests/server-functions-handler.test.ts#L79-L162)
- The inspected Playwright router config builds and previews an app with one Chromium worker; browser specs assert same-origin behavior for control-character URLs and exercise auth login/logout, direct authorization, reload persistence, and disabled prehydration credential controls. — [e2e/react-router/basic-file-based/playwright.config.ts#L4-L40](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/e2e/react-router/basic-file-based/playwright.config.ts#L4-L40) [e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts#L4-L80](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts#L4-L80) [e2e/react-start/basic/tests/auth-docs.spec.ts#L4-L85](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/e2e/react-start/basic/tests/auth-docs.spec.ts#L4-L85)
- PR CI invokes test:pr; CodSpeed CI defines client-nav, SSR, and memory workloads across React/Solid/Vue; bundle tooling declares Node test-runner checks, while router backpressure performance tests are excluded unless RUN_BACKPRESSURE_PERF=1. — [.github/workflows/pr.yml#L33-L38](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/.github/workflows/pr.yml#L33-L38) [.github/workflows/client-nav-benchmarks.yml#L43-L64](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/.github/workflows/client-nav-benchmarks.yml#L43-L64) [benchmarks/bundle-size/package.json#L5-L7](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/benchmarks/bundle-size/package.json#L5-L7) [packages/router-core/vite.config.ts#L23-L28](https://github.com/TanStack/router/blob/1f0f20a3206a28365d74fd2485b9a8eedbf74dd0/packages/router-core/vite.config.ts#L23-L28)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
