diff --git a/CHANGELOG.md b/CHANGELOG.md index 6532f9fc..6e27a1e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/test/app/reducers/appUpdates.test.ts b/test/app/reducers/appUpdates.test.ts new file mode 100644 index 00000000..114dbb3e --- /dev/null +++ b/test/app/reducers/appUpdates.test.ts @@ -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 }); + }); + }); +});