From c2168332228b9d9705a80e8f8be8b4ba241044c0 Mon Sep 17 00:00:00 2001 From: Curtis ROck Date: Thu, 9 Jul 2020 19:37:04 -0500 Subject: [PATCH] linter fixes --- .../reducers/__tests__/compose-test.js | 2 +- .../__tests__/media_attachments-test.js | 27 +++++++++++++++++++ app/soapbox/reducers/__tests__/modal-test.js | 8 +++--- app/soapbox/reducers/__tests__/mutes-test.js | 4 +-- 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 app/soapbox/reducers/__tests__/media_attachments-test.js diff --git a/app/soapbox/reducers/__tests__/compose-test.js b/app/soapbox/reducers/__tests__/compose-test.js index 0def88757..d5306aa33 100644 --- a/app/soapbox/reducers/__tests__/compose-test.js +++ b/app/soapbox/reducers/__tests__/compose-test.js @@ -3,7 +3,7 @@ import { Map as ImmutableMap } from 'immutable'; import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me'; import { SETTING_CHANGE } from 'soapbox/actions/settings'; import * as actions from 'soapbox/actions/compose'; -import { STORE_HYDRATE } from 'soapbox/actions/store'; +//import { STORE_HYDRATE } from 'soapbox/actions/store'; //import { REDRAFT } from 'soapbox/actions/statuses'; import { TIMELINE_DELETE } from 'soapbox/actions/timelines'; diff --git a/app/soapbox/reducers/__tests__/media_attachments-test.js b/app/soapbox/reducers/__tests__/media_attachments-test.js new file mode 100644 index 000000000..95ef822b1 --- /dev/null +++ b/app/soapbox/reducers/__tests__/media_attachments-test.js @@ -0,0 +1,27 @@ +import reducer from '../media_attachments'; +import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; + +describe('media_attachments reducer', () => { + it('should return the initial state', () => { + expect(reducer(undefined, {})).toEqual(ImmutableMap({ + accept_content_types: ImmutableList([ + '.jpg', + '.jpeg', + '.png', + '.gif', + '.webp', + '.webm', + '.mp4', + '.m4v', + '.mov', + 'image/jpeg', + 'image/png', + 'image/gif', + 'image/webp', + 'video/webm', + 'video/mp4', + 'video/quicktime', + ]), + })); + }); +}); diff --git a/app/soapbox/reducers/__tests__/modal-test.js b/app/soapbox/reducers/__tests__/modal-test.js index b5bd7ac14..17125d072 100644 --- a/app/soapbox/reducers/__tests__/modal-test.js +++ b/app/soapbox/reducers/__tests__/modal-test.js @@ -13,12 +13,12 @@ describe('modal reducer', () => { const state = { modalType: null, modalProps: {}, - } + }; const action = { type: MODAL_OPEN, modalType: 'type1', modalProps: { props1: '1' }, - } + }; debugger; expect(reducer(state, action)).toMatchObject({ modalType: 'type1', @@ -30,10 +30,10 @@ describe('modal reducer', () => { const state = { modalType: 'type1', modalProps: { props1: '1' }, - } + }; const action = { type: MODAL_CLOSE, - } + }; debugger; expect(reducer(state, action)).toMatchObject({ modalType: null, diff --git a/app/soapbox/reducers/__tests__/mutes-test.js b/app/soapbox/reducers/__tests__/mutes-test.js index 8678ebf1d..bdf58bba4 100644 --- a/app/soapbox/reducers/__tests__/mutes-test.js +++ b/app/soapbox/reducers/__tests__/mutes-test.js @@ -27,7 +27,7 @@ describe('mutes reducer', () => { const action = { type: MUTES_INIT_MODAL, account: 'account1', - } + }; expect(reducer(state, action)).toEqual(ImmutableMap({ new: ImmutableMap({ isSubmitting: false, @@ -45,7 +45,7 @@ describe('mutes reducer', () => { }); const action = { type: MUTES_TOGGLE_HIDE_NOTIFICATIONS, - } + }; expect(reducer(state, action)).toEqual(ImmutableMap({ new: ImmutableMap({ notifications: false,