blob: 7945ddea91112ef3c604e1b7dbce29586895462c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import getters from '~/diffs/store/getters';
import { PARALLEL_DIFF_VIEW_TYPE, INLINE_DIFF_VIEW_TYPE } from '~/diffs/constants';
describe('DiffsStoreGetters', () => {
describe('isParallelView', () => {
it('should return true if view set to parallel view', () => {
expect(getters.isParallelView({ diffViewType: PARALLEL_DIFF_VIEW_TYPE })).toBeTruthy();
});
it('should return false if view not to parallel view', () => {
expect(getters.isParallelView({ diffViewType: 'foo' })).toBeFalsy();
});
});
describe('isInlineView', () => {
it('should return true if view set to inline view', () => {
expect(getters.isInlineView({ diffViewType: INLINE_DIFF_VIEW_TYPE })).toBeTruthy();
});
it('should return false if view not to inline view', () => {
expect(getters.isInlineView({ diffViewType: PARALLEL_DIFF_VIEW_TYPE })).toBeFalsy();
});
});
});
|