React Router 4 relies on React context to work. You can no longer simply render Link components etc. For unit testing we now have to wrap things with a <MemoryRouter> or <StaticRouter> (see https://reacttraining.com/react-router/core/guides/testing)
As those docs suggest there is possibly another workaround for this my stubbing/mocking the context.
React Router 4 relies on React context to work. You can no longer simply render Link components etc. For unit testing we now have to wrap things with a
<MemoryRouter>or<StaticRouter>(see https://reacttraining.com/react-router/core/guides/testing)As those docs suggest there is possibly another workaround for this my stubbing/mocking the context.