()
| 26 | // Creates one query client for each test case, to make sure that tests are |
| 27 | // isolated and can't affect each other |
| 28 | export function createTestQueryClient() { |
| 29 | return new QueryClient({ |
| 30 | defaultOptions: { |
| 31 | queries: { |
| 32 | retry: false, |
| 33 | gcTime: 0, |
| 34 | refetchOnWindowFocus: false, |
| 35 | networkMode: "offlineFirst", |
| 36 | }, |
| 37 | }, |
| 38 | }); |
| 39 | } |
| 40 | |
| 41 | export const renderWithRouter = ( |
| 42 | router: ReturnType<typeof createMemoryRouter>, |
no outgoing calls