Skip to content

Commit

Permalink
[Misc] Fix failing tests due to react router mock
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 29, 2020
1 parent e5f8e15 commit 87578f8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const mockLocation = {
};

jest.mock('react-router-dom', () => ({
...(jest.requireActual('react-router-dom') as object),
useHistory: jest.fn(() => mockHistory),
useLocation: jest.fn(() => mockLocation),
}));
Expand Down

0 comments on commit 87578f8

Please sign in to comment.