mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
25 lines
862 B
TypeScript
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() });
|
|
});
|
|
});
|
|
});
|