Tests: Boilerplate all reducers
This commit is contained in:
parent
0c1eeb9efa
commit
f4c12c6986
41 changed files with 497 additions and 0 deletions
8
app/soapbox/reducers/__tests__/accounts-test.js
Normal file
8
app/soapbox/reducers/__tests__/accounts-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../accounts';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('accounts reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/accounts_counters-test.js
Normal file
8
app/soapbox/reducers/__tests__/accounts_counters-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../accounts_counters';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('accounts_counters reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/alerts-test.js
Normal file
8
app/soapbox/reducers/__tests__/alerts-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../alerts';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('alerts reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableList());
|
||||
});
|
||||
});
|
30
app/soapbox/reducers/__tests__/compose-test.js
Normal file
30
app/soapbox/reducers/__tests__/compose-test.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import reducer from '../compose';
|
||||
|
||||
describe('compose reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {}).toJS()).toMatchObject({
|
||||
mounted: 0,
|
||||
sensitive: false,
|
||||
spoiler: false,
|
||||
spoiler_text: '',
|
||||
privacy: null,
|
||||
text: '',
|
||||
focusDate: null,
|
||||
caretPosition: null,
|
||||
in_reply_to: null,
|
||||
is_composing: false,
|
||||
is_submitting: false,
|
||||
is_changing_upload: false,
|
||||
is_uploading: false,
|
||||
progress: 0,
|
||||
media_attachments: [],
|
||||
poll: null,
|
||||
suggestion_token: null,
|
||||
suggestions: [],
|
||||
default_privacy: 'public',
|
||||
default_sensitive: false,
|
||||
idempotencyKey: null,
|
||||
tagHistory: [],
|
||||
});
|
||||
});
|
||||
});
|
11
app/soapbox/reducers/__tests__/contexts-test.js
Normal file
11
app/soapbox/reducers/__tests__/contexts-test.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import reducer from '../contexts';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('contexts reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
inReplyTos: ImmutableMap(),
|
||||
replies: ImmutableMap(),
|
||||
}));
|
||||
});
|
||||
});
|
13
app/soapbox/reducers/__tests__/conversations-test.js
Normal file
13
app/soapbox/reducers/__tests__/conversations-test.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import reducer from '../conversations';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('conversations reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
isLoading: false,
|
||||
hasMore: true,
|
||||
mounted: false,
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/custom_emojis-test.js
Normal file
8
app/soapbox/reducers/__tests__/custom_emojis-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../custom_emojis';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('custom_emojis reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableList());
|
||||
});
|
||||
});
|
12
app/soapbox/reducers/__tests__/domain_lists-test.js
Normal file
12
app/soapbox/reducers/__tests__/domain_lists-test.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import reducer from '../domain_lists';
|
||||
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
|
||||
|
||||
describe('domain_lists reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
blocks: ImmutableMap({
|
||||
items: ImmutableOrderedSet(),
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
12
app/soapbox/reducers/__tests__/dropdown_menu-test.js
Normal file
12
app/soapbox/reducers/__tests__/dropdown_menu-test.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import reducer from '../dropdown_menu';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('dropdown_menu reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
openId: null,
|
||||
placement: null,
|
||||
keyboard: false,
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/filters-test.js
Normal file
8
app/soapbox/reducers/__tests__/filters-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../filters';
|
||||
import { List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('filters reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableList());
|
||||
});
|
||||
});
|
15
app/soapbox/reducers/__tests__/group_editor-test.js
Normal file
15
app/soapbox/reducers/__tests__/group_editor-test.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import reducer from '../group_editor';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('group_editor reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
groupId: null,
|
||||
isSubmitting: false,
|
||||
isChanged: false,
|
||||
title: '',
|
||||
description: '',
|
||||
coverImage: null,
|
||||
}));
|
||||
});
|
||||
});
|
12
app/soapbox/reducers/__tests__/group_lists-test.js
Normal file
12
app/soapbox/reducers/__tests__/group_lists-test.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import reducer from '../group_lists';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('group_lists reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
featured: ImmutableList(),
|
||||
member: ImmutableList(),
|
||||
admin: ImmutableList(),
|
||||
}));
|
||||
});
|
||||
});
|
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../group_relationships';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('group_relationships reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/groups-test.js
Normal file
8
app/soapbox/reducers/__tests__/groups-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../groups';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('groups reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/height_cache-test.js
Normal file
8
app/soapbox/reducers/__tests__/height_cache-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../height_cache';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('height_cache reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/identity_proofs-test.js
Normal file
8
app/soapbox/reducers/__tests__/identity_proofs-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../identity_proofs';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('identity_proofs reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
16
app/soapbox/reducers/__tests__/instance-test.js
Normal file
16
app/soapbox/reducers/__tests__/instance-test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import reducer from '../instance';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('instance reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
max_toot_chars: 500,
|
||||
poll_limits: ImmutableMap({
|
||||
max_expiration: 2629746,
|
||||
max_option_chars: 25,
|
||||
max_options: 4,
|
||||
min_expiration: 300,
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
16
app/soapbox/reducers/__tests__/list_adder-test.js
Normal file
16
app/soapbox/reducers/__tests__/list_adder-test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import reducer from '../list_adder';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('list_adder reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
accountId: null,
|
||||
|
||||
lists: ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
loaded: false,
|
||||
isLoading: false,
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
24
app/soapbox/reducers/__tests__/list_editor-test.js
Normal file
24
app/soapbox/reducers/__tests__/list_editor-test.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import reducer from '../list_editor';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('list_editor reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
listId: null,
|
||||
isSubmitting: false,
|
||||
isChanged: false,
|
||||
title: '',
|
||||
|
||||
accounts: ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
loaded: false,
|
||||
isLoading: false,
|
||||
}),
|
||||
|
||||
suggestions: ImmutableMap({
|
||||
value: '',
|
||||
items: ImmutableList(),
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/lists-test.js
Normal file
8
app/soapbox/reducers/__tests__/lists-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../lists';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('lists reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
7
app/soapbox/reducers/__tests__/me-test.js
Normal file
7
app/soapbox/reducers/__tests__/me-test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import reducer from '../me';
|
||||
|
||||
describe('me reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(null);
|
||||
});
|
||||
});
|
27
app/soapbox/reducers/__tests__/media_attachments.js
Normal file
27
app/soapbox/reducers/__tests__/media_attachments.js
Normal file
|
@ -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',
|
||||
]),
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/meta-test.js
Normal file
8
app/soapbox/reducers/__tests__/meta-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../meta';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('meta reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
10
app/soapbox/reducers/__tests__/modal-test.js
Normal file
10
app/soapbox/reducers/__tests__/modal-test.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import reducer from '../modal';
|
||||
|
||||
describe('modal reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual({
|
||||
modalType: null,
|
||||
modalProps: {},
|
||||
});
|
||||
});
|
||||
});
|
14
app/soapbox/reducers/__tests__/mutes-test.js
Normal file
14
app/soapbox/reducers/__tests__/mutes-test.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import reducer from '../mutes';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('mutes reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
new: ImmutableMap({
|
||||
isSubmitting: false,
|
||||
account: null,
|
||||
notifications: true,
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
17
app/soapbox/reducers/__tests__/notifications-test.js
Normal file
17
app/soapbox/reducers/__tests__/notifications-test.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
import reducer from '../notifications';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('notifications reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
hasMore: true,
|
||||
top: false,
|
||||
unread: 0,
|
||||
isLoading: false,
|
||||
queuedNotifications: ImmutableList(),
|
||||
totalQueuedNotificationsCount: 0,
|
||||
lastRead: -1,
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/patron-test.js
Normal file
8
app/soapbox/reducers/__tests__/patron-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../patron';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('patron reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/polls-test.js
Normal file
8
app/soapbox/reducers/__tests__/polls-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../polls';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('polls reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
19
app/soapbox/reducers/__tests__/push_notifications-test.js
Normal file
19
app/soapbox/reducers/__tests__/push_notifications-test.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import reducer from '../push_notifications';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('push_notifications reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
subscription: null,
|
||||
alerts: new ImmutableMap({
|
||||
follow: false,
|
||||
favourite: false,
|
||||
reblog: false,
|
||||
mention: false,
|
||||
poll: false,
|
||||
}),
|
||||
isSubscribed: false,
|
||||
browserSupport: false,
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/relationships-test.js
Normal file
8
app/soapbox/reducers/__tests__/relationships-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../relationships';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('relationships reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
17
app/soapbox/reducers/__tests__/reports-test.js
Normal file
17
app/soapbox/reducers/__tests__/reports-test.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
import reducer from '../reports';
|
||||
import { Map as ImmutableMap, Set as ImmutableSet } from 'immutable';
|
||||
|
||||
describe('reports reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
new: ImmutableMap({
|
||||
isSubmitting: false,
|
||||
account_id: null,
|
||||
status_ids: ImmutableSet(),
|
||||
comment: '',
|
||||
forward: false,
|
||||
block: false,
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
13
app/soapbox/reducers/__tests__/search-test.js
Normal file
13
app/soapbox/reducers/__tests__/search-test.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import reducer from '../search';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('search reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
value: '',
|
||||
submitted: false,
|
||||
hidden: false,
|
||||
results: ImmutableMap(),
|
||||
}));
|
||||
});
|
||||
});
|
10
app/soapbox/reducers/__tests__/settings-test.js
Normal file
10
app/soapbox/reducers/__tests__/settings-test.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import reducer from '../settings';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('settings reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
saved: true,
|
||||
}));
|
||||
});
|
||||
});
|
7
app/soapbox/reducers/__tests__/sidebar-test.js
Normal file
7
app/soapbox/reducers/__tests__/sidebar-test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import reducer from '../sidebar';
|
||||
|
||||
describe('sidebar reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual({});
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/soapbox-test.js
Normal file
8
app/soapbox/reducers/__tests__/soapbox-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../soapbox';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('soapbox reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
19
app/soapbox/reducers/__tests__/status_lists-test.js
Normal file
19
app/soapbox/reducers/__tests__/status_lists-test.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
import reducer from '../status_lists';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('status_lists reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
favourites: ImmutableMap({
|
||||
next: null,
|
||||
loaded: false,
|
||||
items: ImmutableList(),
|
||||
}),
|
||||
pins: ImmutableMap({
|
||||
next: null,
|
||||
loaded: false,
|
||||
items: ImmutableList(),
|
||||
}),
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/statuses-test.js
Normal file
8
app/soapbox/reducers/__tests__/statuses-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../statuses';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('statuses reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
11
app/soapbox/reducers/__tests__/suggestions-test.js
Normal file
11
app/soapbox/reducers/__tests__/suggestions-test.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import reducer from '../suggestions';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('suggestions reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
isLoading: false,
|
||||
}));
|
||||
});
|
||||
});
|
8
app/soapbox/reducers/__tests__/timelines-test.js
Normal file
8
app/soapbox/reducers/__tests__/timelines-test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import reducer from '../timelines';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('timelines reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap());
|
||||
});
|
||||
});
|
11
app/soapbox/reducers/__tests__/trends-test.js
Normal file
11
app/soapbox/reducers/__tests__/trends-test.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import reducer from '../trends';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
|
||||
describe('trends reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
items: ImmutableList(),
|
||||
isLoading: false,
|
||||
}));
|
||||
});
|
||||
});
|
18
app/soapbox/reducers/__tests__/user_lists-test.js
Normal file
18
app/soapbox/reducers/__tests__/user_lists-test.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import reducer from '../user_lists';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
describe('user_lists reducer', () => {
|
||||
it('should return the initial state', () => {
|
||||
expect(reducer(undefined, {})).toEqual(ImmutableMap({
|
||||
followers: ImmutableMap(),
|
||||
following: ImmutableMap(),
|
||||
reblogged_by: ImmutableMap(),
|
||||
favourited_by: ImmutableMap(),
|
||||
follow_requests: ImmutableMap(),
|
||||
blocks: ImmutableMap(),
|
||||
mutes: ImmutableMap(),
|
||||
groups: ImmutableMap(),
|
||||
groups_removed_accounts: ImmutableMap(),
|
||||
}));
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue