Skip to content

Commit 51ff21e

Browse files
committed
Render a memory router in renderWithApolloClient
1 parent c30768b commit 51ff21e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/application/utilities/testing/renderWithApolloClient.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import userEvent from "@testing-library/user-event";
55
import * as Tooltip from "@radix-ui/react-tooltip";
66

77
import { client } from "../../index";
8+
import { MemoryRouter } from "react-router-dom";
89

910
export const renderWithApolloClient = (
1011
ui: ReactElement,
@@ -13,7 +14,7 @@ export const renderWithApolloClient = (
1314
const utils = render(
1415
<Tooltip.Provider>
1516
<ApolloProvider client={client} {...providerProps}>
16-
{ui}
17+
<MemoryRouter>{ui}</MemoryRouter>
1718
</ApolloProvider>
1819
</Tooltip.Provider>,
1920
renderOptions

0 commit comments

Comments
 (0)