Skip to content

Commit

Permalink
fixes for CreateWallet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Johnson committed Jan 28, 2024
1 parent e2f0340 commit 8c6eb5f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/CreateWallet.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ jest.mock('../libs/JmWalletApi', () => ({
postWalletCreate: jest.fn(),
}))

const mockedUseNavigate = jest.fn()
const mockedUseNavigation = jest.fn()
const mockUseLoaderData = jest.fn()
jest.mock('react-router-dom', () => {
return {
...jest.requireActual('react-router-dom'),
useNavigate: () => mockedUseNavigate,
useNavigation: () => mockedUseNavigation,
useLoaderData: () => mockUseLoaderData,
}
})

const NOOP = () => {}

describe('<CreateWallet />', () => {
Expand Down

0 comments on commit 8c6eb5f

Please sign in to comment.