mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(router-generator): fixtures checked through the real router, types in a slow tier
GEN-02: the 59 route tree snapshots (and the edited/scaffolded source
snapshots of file-modification and custom-scaffolding) are replaced:
- generator.test.ts: every fixture's tree is loaded by the real router;
its routes (id, full path, parent, route file, files loaded lazily with
the route) must equal generator-fixtures.ts, reviewed against the file
naming and virtual route docs. Edited route files: expectOnlyOwnedEdits +
constructor/id; custom scaffolds: the template's statements, and their
pages render 'Hello <path>!'; header/footer lines of append-and-prepend.
- integration/fixture-types.test.ts (new slow tier, test:integration):
J1.13, each tree types the same ids, full paths and parents. One
TypeScript program per tree (each augments the router types globally;
one shared program mixes them up), 9.9 s at 1 worker, so not in the fast
tier. Two fixtures are .fails pins for the group layout types bug
(inferFullPath, same as the real-router.test.ts pin).
- generator-fixture.ts: the fixtures' configuration and preparation,
shared by both, runnable on a copy.
- Fixture inputs made valid modules: 13 root files called
createFileRoute/createRootRoute without importing it or exported no
Route; 4 virtual roots were createFileRoute('/') (types: a root route
must be createRootRoute, which also made the parity check fail).
- The virtual-physical-empty-path-conflict-root fixture is deleted: its
case is the outside-corpus characterisation
outside-compiler-corpus/virtual-routes.test.ts (GEN-30, W2-e).
- The virtualGetRouteNodes test is deleted (unused exported helper, ruling
2026-10-17; physical mounts are covered through the generator and the
real watcher in router-plugin integration tests).
- GEN-29: conflict errors through the diagnostics oracle.
- CRLF: LF and CRLF sources give the same routes (not tree bytes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1e06309271
commit
5fb030ebd3
99 changed files with 1160 additions and 9657 deletions
Loading…
Add table
Add a link
Reference in a new issue