Skip to content

Commit

Permalink
Updated tests to use BrowserRouter instead of util/History
Browse files Browse the repository at this point in the history
  • Loading branch information
c8y3 committed Jul 26, 2023
1 parent 40e745f commit f000ac4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/web/wizard/components/lists/CreateListFormInput.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import React from 'react';
import { render } from 'wrappedTestingLibrary';
import { asMock } from 'helpers/mocking';
import { Router } from 'react-router-dom';
import history from 'util/History';
import { BrowserRouter } from 'react-router-dom';

import { IntlProvider } from 'react-intl';
import CreateListFormInput from 'wizard/components/lists/CreateListFormInput';
Expand All @@ -34,9 +33,9 @@ describe('<CreateListFormInput>', () => {

it('should not fail when rendering', () => {
render(<IntlProvider locale="en" >
<Router history={history}>
<BrowserRouter history={history}>
<CreateListFormInput onSave={jest.fn()} />
</Router>
</BrowserRouter>
</IntlProvider>);
});
});

0 comments on commit f000ac4

Please sign in to comment.