chore(frontend): harden settings parsing and update store imports

This commit is contained in:
Yiannis
2026-03-11 02:31:07 +02:00
parent 374ae4de6e
commit 499196b0f6
10 changed files with 34 additions and 10 deletions

View File

@@ -30,6 +30,16 @@ describe('utils/settings', () => {
expect(res.tags).toStrictEqual({ enabled: true, title: 'My Tags' });
});
test('Should ignore non-string title values and keep defaults', () => {
const res = taxonomiesConfig({
tags: { title: null as any },
categories: { title: 123 as any },
});
expect(res.tags).toStrictEqual({ enabled: true, title: 'Tags' });
expect(res.categories).toStrictEqual({ enabled: true, title: 'Categories' });
});
test('Should ignore unknown taxonomy keys', () => {
const input = {
unknownKey: { enabled: true, title: 'X' },