Skip to content

Commit f396cca

Browse files
committed
Merge branch 'match-route-parsed-params' of https://github.com/TanStack/router into match-route-parsed-params
2 parents 94c8373 + 24d14d8 commit f396cca

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

packages/router-core/tests/match-route.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,15 @@ describe('matchRoute', () => {
141141
path: '/projects/$projectId',
142142
params: {
143143
parse: (params: { projectId: string }) => {
144-
if (
145-
typeof (params as Record<string, unknown>).orgId !== 'number'
146-
) {
144+
if (typeof (params as Record<string, unknown>).orgId !== 'number') {
147145
return false
148146
}
149147
return { projectId: Number(params.projectId) }
150148
},
151149
},
152150
})
153151
const router = createTestRouter({
154-
routeTree: rootRoute.addChildren([
155-
orgRoute.addChildren([projectRoute]),
156-
]),
152+
routeTree: rootRoute.addChildren([orgRoute.addChildren([projectRoute])]),
157153
history: createMemoryHistory({
158154
initialEntries: ['/orgs/42/projects/7'],
159155
}),
@@ -250,5 +246,4 @@ describe('matchRoute', () => {
250246
}),
251247
).toEqual({ invoiceId: 123 })
252248
})
253-
254249
})

0 commit comments

Comments
 (0)