Skip to content

Commit

Permalink
mock withRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro-Melnyshyn committed Nov 25, 2024
1 parent 42025bc commit 755defc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/QuickMarcEditor/QuickMarcEditor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { bibLeader } from '../../test/jest/fixtures/leaders';
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
useLocation: jest.fn(),
withRouter: Component => props => <Component history={mockHistory} {...props} />,

Check failure on line 31 in src/QuickMarcEditor/QuickMarcEditor.test.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

'mockHistory' is not defined

Check failure on line 31 in src/QuickMarcEditor/QuickMarcEditor.test.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

'mockHistory' is not defined
}));

jest.mock('../queries', () => ({
Expand Down

0 comments on commit 755defc

Please sign in to comment.