mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(router-generator): route tree helper places routes like router-core
Audit D harness items H1-H4:
- H1: ids and URL paths derive from each route's getParentRoute() the way
router-core's Route.init does; the evaluation fails when getParentRoute
is missing or disagrees with the _addFileChildren nesting, and on two
routes with the same id (router-core's duplicate-id invariant).
- H2: lazyRouteComponent / lazyFn without an export name take `default`
(router-core / react|solid|vue-router lazyRouteComponent default).
- H3: the router stub also provides createLazyFileRoute, createLazyRoute
(a lazy route is { options: { id, ...options } } like LazyRoute) and
createRoute.
- H4: the file a lazy importer loads is found by running the importer
through the instrumented import(), not by a regex on its source.
route-id.ts: the evaluated Route records the constructor that created it
(createdWith), for constructor assertions.
Controls added in route-tree.test.ts and route-id.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aabb82fead
commit
e2adf02429
4 changed files with 261 additions and 74 deletions
Loading…
Add table
Add a link
Reference in a new issue