function renderApp({route = '/', state = {}}) {
  const store = createStore(state)
  const history = createMemoryHistory({initialEntries: [route]})
  const wrapper = mount(
    <Provider store={store}>
      <Router history={history}>
        <App />
      </Router>
    </Provider>,
  )
  return {history, store, wrapper}
}
// which is how we render to a specific URL.
which is how we render to a specific URL.
which is how we render to a specific URL .
function renderApp({route = '/', state = {}}) {
  const store = createStore(state)
  const history = createMemoryHistory({initialEntries: [route]})
  const wrapper = mount(
    <Provider store={store}>
      <Router history={history}>
        <App />
      </Router>
    </Provider>,
  )
  return {history, store, wrapper}
}
function renderApp ( { route = '/' , state = { } } ) { const store = createStore ( state ) const history = createMemoryHistory ( { initialEntries : [ route ] } ) const wrapper = mount ( < Provider store = { store } > < Router history = { history } > < App / > < / Router > < / Provider > , ) return { history , store , wrapper } }
which is how we render to a specific URL.
which is how we render to a specific URL .