mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-28 16:16:24 +00:00
Fixed most tests using react-router-dom hooks
This commit is contained in:
@@ -3,6 +3,11 @@ import { Mock } from 'ts-mockery';
|
||||
import asideMenuCreator from '../../src/common/AsideMenu';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
...jest.requireActual('react-router-dom'),
|
||||
useLocation: jest.fn().mockReturnValue({ pathname: '' }),
|
||||
}));
|
||||
|
||||
describe('<AsideMenu />', () => {
|
||||
let wrapped: ShallowWrapper;
|
||||
const DeleteServerButton = () => null;
|
||||
|
||||
Reference in New Issue
Block a user