Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Feb 17, 2025
1 parent 204c534 commit f61497f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/pages/AccountSettings/tabs/DeletionCard/DeletionCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render, screen } from '@testing-library/react'
import { MemoryRouter, Route } from 'react-router-dom'

import DeletionCard from './DeletionCard'

const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
})

const wrapper: React.FC<React.PropsWithChildren> = ({ children }) => (
<MemoryRouter initialEntries={['/account/gh/test-user']}>
<Route path="/account/:provider/:owner">{children}</Route>
</MemoryRouter>
<QueryClientProvider client={queryClient}>
<MemoryRouter initialEntries={['/account/gh/test-user']}>
<Route path="/account/:provider/:owner">{children}</Route>
</MemoryRouter>
</QueryClientProvider>
)

describe('DeletionCard', () => {

0 comments on commit f61497f

Please sign in to comment.