diff --git a/packages/react-router/tests/routeContext.test.tsx b/packages/react-router/tests/routeContext.test.tsx index 0d1e700621..6ee2c8b433 100644 --- a/packages/react-router/tests/routeContext.test.tsx +++ b/packages/react-router/tests/routeContext.test.tsx @@ -1793,6 +1793,10 @@ describe('useRouteContext in the component', () => { path: '/', component: () => { const context = indexRoute.useRouteContext() + // eslint-disable-next-line ts/no-unnecessary-condition + if (context === undefined) { + throw new Error('context is undefined') + } return
{JSON.stringify(context)}
}, })