rootReducer(undefined, {} as any) --> rootState
This commit is contained in:
parent
e9112506c6
commit
afe1edddf9
3 changed files with 6 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { __stub } from 'soapbox/api';
|
||||
import { mockStore, rootState, rootReducer } from 'soapbox/jest/test-helpers';
|
||||
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||
import { ListRecord, ReducerRecord } from 'soapbox/reducers/user_lists';
|
||||
|
||||
import { normalizeAccount, normalizeInstance, normalizeRelationship } from '../../normalizers';
|
||||
|
@ -74,7 +74,7 @@ describe('fetchAccount()', () => {
|
|||
avatar: 'test.jpg',
|
||||
});
|
||||
|
||||
const state = rootReducer(undefined, {} as any)
|
||||
const state = rootState
|
||||
.set('accounts', ImmutableMap({
|
||||
[id]: account,
|
||||
}) as any);
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Provider } from 'react-redux';
|
|||
import { __stub } from 'soapbox/api';
|
||||
import { normalizePoll } from 'soapbox/normalizers/poll';
|
||||
|
||||
import { mockStore, render, rootReducer, screen } from '../../../jest/test-helpers';
|
||||
import { mockStore, render, screen, rootState } from '../../../jest/test-helpers';
|
||||
import PollFooter from '../poll-footer';
|
||||
|
||||
let poll = normalizePoll({
|
||||
|
@ -36,7 +36,7 @@ describe('<PollFooter />', () => {
|
|||
});
|
||||
|
||||
const user = userEvent.setup();
|
||||
const store = mockStore(rootReducer(undefined, {} as any));
|
||||
const store = mockStore(rootState);
|
||||
render(
|
||||
<Provider store={store}>
|
||||
<IntlProvider locale='en'>
|
||||
|
|
|
@ -5,12 +5,11 @@ import { Provider } from 'react-redux';
|
|||
import '@testing-library/jest-dom';
|
||||
|
||||
import { MODAL_OPEN } from 'soapbox/actions/modals';
|
||||
import { mockStore } from 'soapbox/jest/test-helpers';
|
||||
import rootReducer from 'soapbox/reducers';
|
||||
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||
|
||||
import ComposeButton from '../compose-button';
|
||||
|
||||
const store = mockStore(rootReducer(undefined, {} as any));
|
||||
const store = mockStore(rootState);
|
||||
const renderComposeButton = () => {
|
||||
render(
|
||||
<Provider store={store}>
|
||||
|
|
Loading…
Reference in a new issue