React Router 4 has a MemoryRouter
import { MemoryRouter } from 'react-router'
A that keeps the history of your “URL” in memory (does not
read or write to the address bar). Useful in tests and non-browser
environments like React Native.
https://reacttraining.com/react-router/web/api/MemoryRouter