diff --git a/packages/react-router/tests/routeContext.test.tsx b/packages/react-router/tests/routeContext.test.tsx index 40b4294ee9..adcd404831 100644 --- a/packages/react-router/tests/routeContext.test.tsx +++ b/packages/react-router/tests/routeContext.test.tsx @@ -2123,6 +2123,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