Skip to content

Commit 2f53719

Browse files
committed
remember to set the notFoundComponent at root
1 parent 39dc575 commit 2f53719

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/solid-router/tests/router.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,11 @@ describe('statusCode reset on navigation', () => {
16781678
it('should set statusCode to 404 when a route beforeLoad throws a notFound()', async () => {
16791679
const history = createMemoryHistory({ initialEntries: ['/'] })
16801680

1681-
const rootRoute = createRootRoute()
1681+
const rootRoute = createRootRoute({
1682+
notFoundComponent: () => (
1683+
<div data-testid="not-found-component">Not Found</div>
1684+
),
1685+
})
16821686

16831687
const indexRoute = createRoute({
16841688
getParentRoute: () => rootRoute,

0 commit comments

Comments
 (0)