chore: minor code enhancements

This commit is contained in:
Yiannis
2026-03-21 16:38:30 +02:00
parent c8b47a7922
commit 20682a543a
18 changed files with 115 additions and 103 deletions

View File

@@ -58,12 +58,12 @@ describe('utils/settings', () => {
});
test('Does not mutate input objects', () => {
const themeIn: any = { mode: ' dark ', switch: { enabled: false, position: ' sidebar ' } };
const themeIn = { mode: ' dark ', switch: { enabled: false, position: ' sidebar ' } };
const logoIn = { lightMode: { img: ' x ', svg: ' y ' }, darkMode: { img: ' z ', svg: ' w ' } };
const themeCopy = JSON.parse(JSON.stringify(themeIn));
const logoCopy = JSON.parse(JSON.stringify(logoIn));
themeConfig(themeIn, logoIn);
themeConfig(themeIn as any, logoIn);
expect(themeIn).toStrictEqual(themeCopy);
expect(logoIn).toStrictEqual(logoCopy);