diff --git a/app/soapbox/actions/__tests__/accounts.test.ts b/app/soapbox/actions/__tests__/accounts.test.ts index 6ec79d68bd..0793e36f7b 100644 --- a/app/soapbox/actions/__tests__/accounts.test.ts +++ b/app/soapbox/actions/__tests__/accounts.test.ts @@ -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); diff --git a/app/soapbox/components/polls/__tests__/poll-footer.test.tsx b/app/soapbox/components/polls/__tests__/poll-footer.test.tsx index 9a403e339d..29c841a0a1 100644 --- a/app/soapbox/components/polls/__tests__/poll-footer.test.tsx +++ b/app/soapbox/components/polls/__tests__/poll-footer.test.tsx @@ -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('', () => { }); const user = userEvent.setup(); - const store = mockStore(rootReducer(undefined, {} as any)); + const store = mockStore(rootState); render( diff --git a/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx b/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx index 5dec81b27b..c98b7aa507 100644 --- a/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx @@ -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(