Skip to content

Commit

Permalink
fix: merge testRoute declarations into a single one (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocorallo authored Jul 8, 2023
1 parent bd617e3 commit 1cfe90f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/router/__tests__/createRoutes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('everything', () => {
})
const testRoute = new Route({
getParentRoute: () => rootRoute,
component: lazy(() => import('./TestComponent'), 'NamedComponent'),
path: 'test',
validateSearch: (search) =>
z
Expand Down Expand Up @@ -144,12 +145,6 @@ describe('everything', () => {
component: () => 'layout-b',
})

const testRoute = new Route({
getParentRout: () => rootRoute,
path: 'testPath',
component: lazy(() => import('./TestComponent'), 'NamedComponent'),
})

const routeTree = rootRoute.addChildren([
indexRoute,
testRoute,
Expand All @@ -159,8 +154,7 @@ describe('everything', () => {
usersRoute.addChildren([userRoute]),
]),
authenticatedRoute.addChildren([authenticatedIndexRoute]),
layoutRoute.addChildren([layoutARoute, layoutBRoute]),
testRoute,
layoutRoute.addChildren([layoutARoute, layoutBRoute])
])

type MyRoutesInfo = RoutesInfo<typeof routeTree>
Expand Down

0 comments on commit 1cfe90f

Please sign in to comment.