Until now, in unit tests, react router match params were retrieved as props of component. So testing a component considering some specific match, with specific url parameter
I looked at the tests for hooks in the react-router repo and it looks like you have to wrap your component inside a MemoryRouter and Route. I ended up doing something like this to make my tests work:
import {Route, MemoryRouter} from 'react-router-dom';
...
const renderWithRouter = ({children}) => (
render(
{children}
)
)
Hope that helps!