Skip to content

Commit f61497f

Browse files
committed
fix tests
1 parent 204c534 commit f61497f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/pages/AccountSettings/tabs/DeletionCard/DeletionCard.test.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
12
import { render, screen } from '@testing-library/react'
23
import { MemoryRouter, Route } from 'react-router-dom'
34

45
import DeletionCard from './DeletionCard'
56

7+
const queryClient = new QueryClient({
8+
defaultOptions: { queries: { retry: false } },
9+
})
10+
611
const wrapper: React.FC<React.PropsWithChildren> = ({ children }) => (
7-
<MemoryRouter initialEntries={['/account/gh/test-user']}>
8-
<Route path="/account/:provider/:owner">{children}</Route>
9-
</MemoryRouter>
12+
<QueryClientProvider client={queryClient}>
13+
<MemoryRouter initialEntries={['/account/gh/test-user']}>
14+
<Route path="/account/:provider/:owner">{children}</Route>
15+
</MemoryRouter>
16+
</QueryClientProvider>
1017
)
1118

1219
describe('DeletionCard', () => {

0 commit comments

Comments
 (0)