Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit 5f01ab9

Browse files
committed
Add test for misnamed routing store key
1 parent 21b8512 commit 5f01ab9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,14 @@ describe('syncReduxAndRouter', () => {
184184
changeId: 3
185185
});
186186
})
187+
188+
it('throws if "routing" key is missing with default selectRouteState', () => {
189+
const store = createStore(combineReducers({
190+
notRouting: routeReducer
191+
}));
192+
const history = createHistory();
193+
expect(
194+
() => syncReduxAndRouter(history, store)
195+
).toThrow(/Cannot sync router: route state does not exist/);
196+
});
187197
});

0 commit comments

Comments
 (0)