test(settings): add test cases for empty setting value return value

This commit is contained in:
2026-08-05 01:45:39 +02:00
parent c785ad552c
commit 77bfa24536
@@ -54,6 +54,11 @@ describe('useSettings', () => {
settings.set(settingPath, value);
expect(getSetting(settingPath)).toBe(value);
});
test('returns undefined if there is no value', () => {
const { getSetting } = useSettings();
expect(getSetting(['test', 'bool'])).toBeUndefined();
});
});
});
@@ -76,6 +81,11 @@ beforeEach(() => {
i18n: '',
name: 'number',
default: settingDefaultValue
},
{
type: 'bool',
i18n: '',
name: 'bool'
}
]
}