diff --git a/src/QuickMarcEditor/QuickMarcEditor.test.js b/src/QuickMarcEditor/QuickMarcEditor.test.js index 214a7d81..18dd6c13 100644 --- a/src/QuickMarcEditor/QuickMarcEditor.test.js +++ b/src/QuickMarcEditor/QuickMarcEditor.test.js @@ -2,6 +2,8 @@ import React from 'react'; import faker from 'faker'; import { useLocation } from 'react-router'; +import { createMemoryHistory } from 'history'; + import { render, @@ -25,9 +27,12 @@ import Harness from '../../test/jest/helpers/harness'; import buildStripes from '../../test/jest/__mock__/stripesCore.mock'; import { bibLeader } from '../../test/jest/fixtures/leaders'; +const mockHistory = createMemoryHistory(); + jest.mock('react-router', () => ({ ...jest.requireActual('react-router'), useLocation: jest.fn(), + withRouter: Component => props => , })); jest.mock('../queries', () => ({