react-router
mocking react-router
Use hooks and mock them instead;
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useParams: () => ({
myRoute: 'some-route-value',
}),
}));
Use hooks and mock them instead;
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useParams: () => ({
myRoute: 'some-route-value',
}),
}));