2022-11-04 21:45:03 +03:00
|
|
|
import { sidebarReducer, sidebarNotPresent, sidebarPresent } from '../../../src/common/reducers/sidebar';
|
2022-03-11 18:12:54 +03:00
|
|
|
|
|
|
|
describe('sidebarReducer', () => {
|
|
|
|
describe('reducer', () => {
|
|
|
|
it.each([
|
2022-11-04 21:45:03 +03:00
|
|
|
[sidebarPresent.toString(), { sidebarPresent: true }],
|
|
|
|
[sidebarNotPresent.toString(), { sidebarPresent: false }],
|
2022-03-11 18:12:54 +03:00
|
|
|
])('returns expected on %s', (type, expected) => {
|
2022-11-04 21:45:03 +03:00
|
|
|
expect(sidebarReducer(undefined, { type })).toEqual(expected);
|
2022-03-11 18:12:54 +03:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('sidebarPresent', () => {
|
|
|
|
it('returns expected action', () => {
|
2022-11-04 21:45:03 +03:00
|
|
|
expect(sidebarPresent()).toEqual({ type: sidebarPresent.toString() });
|
2022-03-11 18:12:54 +03:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('sidebarNotPresent', () => {
|
|
|
|
it('returns expected action', () => {
|
2022-11-04 21:45:03 +03:00
|
|
|
expect(sidebarNotPresent()).toEqual({ type: sidebarNotPresent.toString() });
|
2022-03-11 18:12:54 +03:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|