diff --git a/src/__tests__/ReduxRouter-test.js b/src/__tests__/ReduxRouter-test.js index ca751b6..604380c 100644 --- a/src/__tests__/ReduxRouter-test.js +++ b/src/__tests__/ReduxRouter-test.js @@ -123,6 +123,26 @@ describe('', () => { expect(child.props.location.pathname).to.equal('/parent/child/321'); }); + it('provides access to `getState` in transition hooks', () => { + function createRouteWithTransitionHooks() { + const reducer = combineReducers({ + router: routerStateReducer + }); + + const history = createHistory(); + const getRoutes = ({ getState }) => { + return (); + } + + const store = reduxReactRouter({ + getRoutes, history + })(createStore)(reducer); + } + + expect(createRouteWithTransitionHooks).to.not.throw(Error); + }); + + describe('server-side rendering', () => { it('works', () => { const reducer = combineReducers({