MCPcopy Index your code
hub / github.com/coder/coder / renderWithRouter

Function renderWithRouter

site/src/testHelpers/renderHelpers.tsx:41–54  ·  view source on GitHub ↗
(
	router: ReturnType<typeof createMemoryRouter>,
)

Source from the content-addressed store, hash-verified

39}
40
41export const renderWithRouter = (
42 router: ReturnType<typeof createMemoryRouter>,
43) => {
44 const queryClient = createTestQueryClient();
45
46 return {
47 ...testingLibraryRender(
48 <AppProviders queryClient={queryClient}>
49 <RouterProvider router={router} />
50 </AppProviders>,
51 ),
52 router,
53 };
54};
55
56export const render = (element: ReactNode) => {
57 return renderWithRouter(

Callers 7

LoginPage.test.tsxFile · 0.90
SetupPage.test.tsxFile · 0.90
renderFunction · 0.85
renderWithAuthFunction · 0.85

Calls 1

createTestQueryClientFunction · 0.70

Tested by

no test coverage detected