mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
24 lines
805 B
TypeScript
24 lines
805 B
TypeScript
import { sidebarReducer, sidebarNotPresent, sidebarPresent } from '../../../src/common/reducers/sidebar';
|
|
|
|
describe('sidebarReducer', () => {
|
|
describe('reducer', () => {
|
|
it.each([
|
|
[sidebarPresent.toString(), { sidebarPresent: true }],
|
|
[sidebarNotPresent.toString(), { sidebarPresent: false }],
|
|
])('returns expected on %s', (type, expected) => {
|
|
expect(sidebarReducer(undefined, { type })).toEqual(expected);
|
|
});
|
|
});
|
|
|
|
describe('sidebarPresent', () => {
|
|
it('returns expected action', () => {
|
|
expect(sidebarPresent()).toEqual({ type: sidebarPresent.toString() });
|
|
});
|
|
});
|
|
|
|
describe('sidebarNotPresent', () => {
|
|
it('returns expected action', () => {
|
|
expect(sidebarNotPresent()).toEqual({ type: sidebarNotPresent.toString() });
|
|
});
|
|
});
|
|
});
|