shlink-web-client/test/app/reducers/appUpdates.test.ts
2022-11-04 19:39:15 +01:00

25 lines
862 B
TypeScript

import { appUpdatesReducer, appUpdateAvailable, resetAppUpdate } from '../../../src/app/reducers/appUpdates';
describe('appUpdatesReducer', () => {
describe('reducer', () => {
it('returns true on APP_UPDATE_AVAILABLE', () => {
expect(appUpdatesReducer(undefined, { type: appUpdateAvailable.toString() })).toEqual(true);
});
it('returns false on RESET_APP_UPDATE', () => {
expect(appUpdatesReducer(undefined, { type: resetAppUpdate.toString() })).toEqual(false);
});
});
describe('appUpdateAvailable', () => {
it('creates expected action', () => {
expect(appUpdateAvailable()).toEqual({ type: appUpdateAvailable.toString() });
});
});
describe('resetAppUpdate', () => {
it('creates expected action', () => {
expect(resetAppUpdate()).toEqual({ type: resetAppUpdate.toString() });
});
});
});