mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-08 17:27:32 +03:00
Added appUpdates reducer test
This commit is contained in:
parent
5caa648112
commit
bfeb282aa9
2 changed files with 32 additions and 2 deletions
|
@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||
|
||||
## [Unreleased]
|
||||
## [3.1.2] - 2021-06-06
|
||||
### Added
|
||||
* *Nothing*
|
||||
|
||||
|
@ -18,7 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
* *Nothing*
|
||||
|
||||
### Fixed
|
||||
* *Nothing*
|
||||
* [#371](https://github.com/shlinkio/shlink-web-client/issues/371) Recovered PWA functionality.
|
||||
|
||||
|
||||
## [3.1.1] - 2021-05-08
|
||||
|
|
30
test/app/reducers/appUpdates.test.ts
Normal file
30
test/app/reducers/appUpdates.test.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import reducer, {
|
||||
APP_UPDATE_AVAILABLE,
|
||||
RESET_APP_UPDATE,
|
||||
appUpdateAvailable,
|
||||
resetAppUpdate,
|
||||
} from '../../../src/app/reducers/appUpdates';
|
||||
|
||||
describe('appUpdatesReducer', () => {
|
||||
describe('reducer', () => {
|
||||
it('returns true on APP_UPDATE_AVAILABLE', () => {
|
||||
expect(reducer(undefined, { type: APP_UPDATE_AVAILABLE })).toEqual(true);
|
||||
});
|
||||
|
||||
it('returns false on RESET_APP_UPDATE', () => {
|
||||
expect(reducer(undefined, { type: RESET_APP_UPDATE })).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('appUpdateAvailable', () => {
|
||||
test('creates expected action', () => {
|
||||
expect(appUpdateAvailable()).toEqual({ type: APP_UPDATE_AVAILABLE });
|
||||
});
|
||||
});
|
||||
|
||||
describe('resetAppUpdate', () => {
|
||||
test('creates expected action', () => {
|
||||
expect(resetAppUpdate()).toEqual({ type: RESET_APP_UPDATE });
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue