mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 14:21:49 +00:00
Ensured settings migration function does not crash if settings are not set
This commit is contained in:
@@ -4,6 +4,10 @@ import { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('settings-helpers', () => {
|
||||
describe('migrateDeprecatedSettings', () => {
|
||||
it('returns object as is if settings are not set', () => {
|
||||
expect(migrateDeprecatedSettings({})).toEqual({});
|
||||
});
|
||||
|
||||
it('updates settings as expected', () => {
|
||||
const state = Mock.of<ShlinkState>({
|
||||
settings: {
|
||||
|
||||
Reference in New Issue
Block a user