Skip to content

Commit ee0874f

Browse files
committed
fix: tests
1 parent c6c9bc7 commit ee0874f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/react-router/tests/route.test-d.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('when creating the root', () => {
2626

2727
test('when creating the root with routeContext', () => {
2828
const rootRoute = createRootRoute({
29-
routeContext: (opts) => {
29+
context: (opts) => {
3030
expectTypeOf(opts).toEqualTypeOf<{
3131
abortController: AbortController
3232
preload: boolean
@@ -95,7 +95,7 @@ test('when creating the root route with context and routeContext', () => {
9595
const createRouteResult = createRootRouteWithContext<{ userId: string }>()
9696

9797
const rootRoute = createRouteResult({
98-
routeContext: (opts) => {
98+
context: (opts) => {
9999
expectTypeOf(opts).toEqualTypeOf<{
100100
abortController: AbortController
101101
preload: boolean
@@ -198,7 +198,7 @@ test('when creating the root route with context, routeContext, beforeLoad and a
198198
const createRouteResult = createRootRouteWithContext<{ userId: string }>()
199199

200200
const rootRoute = createRouteResult({
201-
routeContext: (opt) => {
201+
context: (opt) => {
202202
expectTypeOf(opt).toEqualTypeOf<{
203203
abortController: AbortController
204204
preload: boolean
@@ -307,7 +307,7 @@ test('when creating a child route with routeContext from the root route with con
307307
createRoute({
308308
path: 'invoices',
309309
getParentRoute: () => rootRoute,
310-
routeContext: (opts) => {
310+
context: (opts) => {
311311
expectTypeOf(opts).toEqualTypeOf<{
312312
abortController: AbortController
313313
preload: boolean
@@ -566,7 +566,7 @@ test('when creating a child route with params, search with routeContext from the
566566
path: 'invoices/$invoiceId',
567567
getParentRoute: () => rootRoute,
568568
validateSearch: () => ({ page: 0 }),
569-
routeContext: (opts) => {
569+
context: (opts) => {
570570
expectTypeOf(opts).toEqualTypeOf<{
571571
abortController: AbortController
572572
preload: boolean
@@ -612,7 +612,7 @@ test('when creating a child route with params, search with routeContext, beforeL
612612
path: 'invoices/$invoiceId',
613613
getParentRoute: () => rootRoute,
614614
validateSearch: () => ({ page: 0 }),
615-
routeContext: (opts) => {
615+
context: (opts) => {
616616
expectTypeOf(opts).toEqualTypeOf<{
617617
abortController: AbortController
618618
preload: boolean
@@ -726,7 +726,7 @@ test('when creating a child route with routeContext from a parent with routeCont
726726
const invoicesRoute = createRoute({
727727
path: 'invoices',
728728
getParentRoute: () => rootRoute,
729-
routeContext: (opt) => {
729+
context: (opt) => {
730730
expectTypeOf(opt).toEqualTypeOf<{
731731
abortController: AbortController
732732
preload: boolean
@@ -746,7 +746,7 @@ test('when creating a child route with routeContext from a parent with routeCont
746746
const detailsRoute = createRoute({
747747
path: 'details',
748748
getParentRoute: () => invoicesRoute,
749-
routeContext: (opt) => {
749+
context: (opt) => {
750750
expectTypeOf(opt).toEqualTypeOf<{
751751
abortController: AbortController
752752
preload: boolean
@@ -851,7 +851,7 @@ test('when creating a child route with routeContext, beforeLoad, search, params,
851851
path: 'invoices',
852852
getParentRoute: () => rootRoute,
853853
validateSearch: () => ({ page: 0 }),
854-
routeContext: (opt) => {
854+
context: (opt) => {
855855
expectTypeOf(opt).toEqualTypeOf<{
856856
abortController: AbortController
857857
preload: boolean
@@ -890,7 +890,7 @@ test('when creating a child route with routeContext, beforeLoad, search, params,
890890
path: 'details',
891891
getParentRoute: () => invoiceRoute,
892892
validateSearch: () => ({ detailPage: 0 }),
893-
routeContext: (opt) => {
893+
context: (opt) => {
894894
expectTypeOf(opt).toEqualTypeOf<{
895895
abortController: AbortController
896896
preload: boolean
@@ -1336,7 +1336,7 @@ test('when routeContext throws', () => {
13361336
const invoicesRoute = createRoute({
13371337
getParentRoute: () => rootRoute,
13381338
path: 'invoices',
1339-
routeContext: () => {
1339+
context: () => {
13401340
throw redirect({ to: '/somewhere' })
13411341
},
13421342
})

0 commit comments

Comments
 (0)