kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
linter fixes
rodzic
2018e5238b
commit
c216833222
|
@ -3,7 +3,7 @@ import { Map as ImmutableMap } from 'immutable';
|
||||||
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me';
|
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me';
|
||||||
import { SETTING_CHANGE } from 'soapbox/actions/settings';
|
import { SETTING_CHANGE } from 'soapbox/actions/settings';
|
||||||
import * as actions from 'soapbox/actions/compose';
|
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 { REDRAFT } from 'soapbox/actions/statuses';
|
||||||
import { TIMELINE_DELETE } from 'soapbox/actions/timelines';
|
import { TIMELINE_DELETE } from 'soapbox/actions/timelines';
|
||||||
|
|
||||||
|
|
|
@ -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',
|
||||||
|
]),
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
});
|
|
@ -13,12 +13,12 @@ describe('modal reducer', () => {
|
||||||
const state = {
|
const state = {
|
||||||
modalType: null,
|
modalType: null,
|
||||||
modalProps: {},
|
modalProps: {},
|
||||||
}
|
};
|
||||||
const action = {
|
const action = {
|
||||||
type: MODAL_OPEN,
|
type: MODAL_OPEN,
|
||||||
modalType: 'type1',
|
modalType: 'type1',
|
||||||
modalProps: { props1: '1' },
|
modalProps: { props1: '1' },
|
||||||
}
|
};
|
||||||
debugger;
|
debugger;
|
||||||
expect(reducer(state, action)).toMatchObject({
|
expect(reducer(state, action)).toMatchObject({
|
||||||
modalType: 'type1',
|
modalType: 'type1',
|
||||||
|
@ -30,10 +30,10 @@ describe('modal reducer', () => {
|
||||||
const state = {
|
const state = {
|
||||||
modalType: 'type1',
|
modalType: 'type1',
|
||||||
modalProps: { props1: '1' },
|
modalProps: { props1: '1' },
|
||||||
}
|
};
|
||||||
const action = {
|
const action = {
|
||||||
type: MODAL_CLOSE,
|
type: MODAL_CLOSE,
|
||||||
}
|
};
|
||||||
debugger;
|
debugger;
|
||||||
expect(reducer(state, action)).toMatchObject({
|
expect(reducer(state, action)).toMatchObject({
|
||||||
modalType: null,
|
modalType: null,
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe('mutes reducer', () => {
|
||||||
const action = {
|
const action = {
|
||||||
type: MUTES_INIT_MODAL,
|
type: MUTES_INIT_MODAL,
|
||||||
account: 'account1',
|
account: 'account1',
|
||||||
}
|
};
|
||||||
expect(reducer(state, action)).toEqual(ImmutableMap({
|
expect(reducer(state, action)).toEqual(ImmutableMap({
|
||||||
new: ImmutableMap({
|
new: ImmutableMap({
|
||||||
isSubmitting: false,
|
isSubmitting: false,
|
||||||
|
@ -45,7 +45,7 @@ describe('mutes reducer', () => {
|
||||||
});
|
});
|
||||||
const action = {
|
const action = {
|
||||||
type: MUTES_TOGGLE_HIDE_NOTIFICATIONS,
|
type: MUTES_TOGGLE_HIDE_NOTIFICATIONS,
|
||||||
}
|
};
|
||||||
expect(reducer(state, action)).toEqual(ImmutableMap({
|
expect(reducer(state, action)).toEqual(ImmutableMap({
|
||||||
new: ImmutableMap({
|
new: ImmutableMap({
|
||||||
notifications: false,
|
notifications: false,
|
||||||
|
|
Ładowanie…
Reference in New Issue