Run rootReducer in tests

This commit is contained in:
Alex Gleason 2021-01-18 14:14:08 -06:00
parent fb99d36494
commit 47ed1e42c9
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 4 additions and 2 deletions

View file

@ -16,7 +16,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
className="emoji-react-selector__emoji"
dangerouslySetInnerHTML={
Object {
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"❤\\" title=\\":heart:\\" src=\\"/emoji/2764.svg\\" />",
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"❤\\" title=\\":heart:\\" src=\\"/emoji/2764.svg\\" />",
}
}
/>

View file

@ -11,6 +11,7 @@ describe('instance reducer', () => {
max_options: 4,
min_expiration: 300,
}),
version: '0.0.0',
}));
});
});

View file

@ -8,6 +8,7 @@ import { IntlProvider } from 'react-intl';
import { BrowserRouter } from 'react-router-dom';
import configureMockStore from 'redux-mock-store';
import { Map as ImmutableMap } from 'immutable';
import rootReducer from 'soapbox/reducers';
// Mock Redux
// https://redux.js.org/recipes/writing-tests/
@ -18,7 +19,7 @@ export const mockStore = configureMockStore(middlewares);
export const createComponent = (children, props = {}) => {
props = ImmutableMap({
locale: 'en',
store: mockStore(ImmutableMap()),
store: mockStore(rootReducer(ImmutableMap(), {})),
}).merge(props);
return renderer.create(