mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-12 02:23:49 +00:00
First refactor of redux tests to avoid covering RTK implementation details
This commit is contained in:
@@ -3,23 +3,11 @@ import { appUpdateAvailable, appUpdatesReducer, resetAppUpdate } from '../../../
|
||||
describe('appUpdatesReducer', () => {
|
||||
describe('reducer', () => {
|
||||
it('returns true on APP_UPDATE_AVAILABLE', () => {
|
||||
expect(appUpdatesReducer(undefined, { type: appUpdateAvailable.toString() })).toEqual(true);
|
||||
expect(appUpdatesReducer(undefined, appUpdateAvailable())).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() });
|
||||
expect(appUpdatesReducer(undefined, resetAppUpdate())).toEqual(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user