diff --git a/app/soapbox/features/ui/__tests__/index.test.tsx b/app/soapbox/features/ui/__tests__/index.test.tsx index 5a3164996..c28c21589 100644 --- a/app/soapbox/features/ui/__tests__/index.test.tsx +++ b/app/soapbox/features/ui/__tests__/index.test.tsx @@ -15,12 +15,12 @@ const TestableComponent = () => ( Sign in {/* WrappedRount will redirect to /login for logged out users... which will resolve to the route above! */} - + null} /> ); describe('', () => { - let store; + let store: any; beforeEach(() => { store = { 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 86b9b84bd..5dec81b27 100644 --- a/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/compose-button.test.tsx @@ -1,5 +1,4 @@ import { fireEvent, render, screen } from '@testing-library/react'; -import { Map as ImmutableMap } from 'immutable'; import React from 'react'; import { IntlProvider } from 'react-intl'; import { Provider } from 'react-redux'; @@ -11,7 +10,7 @@ import rootReducer from 'soapbox/reducers'; import ComposeButton from '../compose-button'; -const store = mockStore(rootReducer(ImmutableMap(), {})); +const store = mockStore(rootReducer(undefined, {} as any)); const renderComposeButton = () => { render( diff --git a/app/soapbox/features/ui/components/__tests__/cta-banner.test.tsx b/app/soapbox/features/ui/components/__tests__/cta-banner.test.tsx index cc4c118e6..dbda24b55 100644 --- a/app/soapbox/features/ui/components/__tests__/cta-banner.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/cta-banner.test.tsx @@ -14,7 +14,7 @@ describe('', () => { it('renders empty', () => { const store = { me: true }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('cta-banner')).toHaveLength(0); }); }); @@ -23,7 +23,7 @@ describe('', () => { it('renders empty', () => { const store = { soapbox: ImmutableMap({ singleUserMode: true }) }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('cta-banner')).toHaveLength(0); }); }); diff --git a/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx b/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx index 3dea16d97..d0ec92f96 100644 --- a/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx @@ -5,7 +5,9 @@ import { render, screen } from '../../../../jest/test-helpers'; import { normalizeAccount, normalizeRelationship } from '../../../../normalizers'; import SubscribeButton from '../subscription-button'; -let account = { +import type { ReducerAccount } from 'soapbox/reducers/accounts'; + +const justin = { id: '1', acct: 'justin-username', display_name: 'Justin L', @@ -13,13 +15,13 @@ let account = { }; describe('', () => { - let store; + let store: any; describe('with "accountNotifies" disabled', () => { it('renders nothing', () => { - account = normalizeAccount({ ...account, relationship: normalizeRelationship({ following: true }) }); + const account = normalizeAccount({ ...justin, relationship: normalizeRelationship({ following: true }) }) as ReducerAccount; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('icon-button')).toHaveLength(0); }); }); diff --git a/app/soapbox/features/ui/components/__tests__/trends-panel.test.tsx b/app/soapbox/features/ui/components/__tests__/trends-panel.test.tsx index 03ae48553..487a84bfb 100644 --- a/app/soapbox/features/ui/components/__tests__/trends-panel.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/trends-panel.test.tsx @@ -23,7 +23,7 @@ describe('', () => { })(), }; - render(, null, store); + render(, undefined, store); expect(screen.getByTestId('hashtag')).toHaveTextContent(/hashtag 1/i); expect(screen.getByTestId('hashtag')).toHaveTextContent(/180 people talking/i); expect(screen.getByTestId('sparklines')).toBeInTheDocument(); @@ -46,7 +46,7 @@ describe('', () => { })(), }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('hashtag')).toHaveLength(2); }); @@ -67,7 +67,7 @@ describe('', () => { })(), }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('hashtag')).toHaveLength(1); }); @@ -79,7 +79,7 @@ describe('', () => { })(), }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('hashtag')).toHaveLength(0); }); }); diff --git a/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx b/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx index 56e4f8422..84a645514 100644 --- a/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx @@ -24,7 +24,7 @@ describe('', () => { }, }; - render(, null, store); + render(, undefined, store); expect(screen.getByTestId('account')).toHaveTextContent(/my name/i); }); @@ -58,7 +58,7 @@ describe('', () => { }, }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('account')).toHaveLength(2); }); @@ -92,7 +92,7 @@ describe('', () => { }, }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('account')).toHaveLength(1); }); @@ -117,7 +117,7 @@ describe('', () => { }, }; - render(, null, store); + render(, undefined, store); expect(screen.queryAllByTestId('account')).toHaveLength(0); }); }); diff --git a/app/soapbox/features/ui/components/modals/report-modal/__tests__/report-modal.test.tsx b/app/soapbox/features/ui/components/modals/report-modal/__tests__/report-modal.test.tsx index 1fe62d7f2..a2dee08b5 100644 --- a/app/soapbox/features/ui/components/modals/report-modal/__tests__/report-modal.test.tsx +++ b/app/soapbox/features/ui/components/modals/report-modal/__tests__/report-modal.test.tsx @@ -9,7 +9,7 @@ import { normalizeAccount, normalizeStatus } from '../../../../../../normalizers import ReportModal from '../report-modal'; describe('', () => { - let store; + let store: any; beforeEach(() => { const rules = require('soapbox/__fixtures__/rules.json');