Enable overriding connect defaults with query params, closes #49

This commit is contained in:
Ken-Håvard Lieng 2020-05-08 10:12:21 +02:00
parent dcbf3397c1
commit eab788a782
10 changed files with 177 additions and 328 deletions

View file

@ -85,7 +85,7 @@ describe('tab reducer', () => {
it('clears the tab when navigating to a non-tab page', () => {
let state = reducer(undefined, setSelectedTab('srv', '#chan'));
state = reducer(state, locationChanged('settings'));
state = reducer(state, locationChanged('settings', {}, {}));
expect(state).toEqual({
selected: {},
@ -96,10 +96,14 @@ describe('tab reducer', () => {
it('selects the tab and adds it to history when navigating to a tab', () => {
const state = reducer(
undefined,
locationChanged('chat', {
server: 'srv',
name: '#chan'
})
locationChanged(
'chat',
{
server: 'srv',
name: '#chan'
},
{}
)
);
expect(state).toEqual({