Refactor/reacrhitecture to fsd+ #49

Merged
ilia merged 70 commits from refactor/reacrhitecture-to-fsd+ into main 2026-06-03 09:55:47 +00:00
Showing only changes of commit 724b00d3d5 - Show all commits
@@ -7,6 +7,7 @@ import {
describe,
expect,
it,
vi,
} from 'vitest';
// Helper to flush Svelte effects (they run in microtasks)
@@ -69,12 +70,17 @@ describe('layoutStore', () => {
});
it('should default to list mode when localStorage has invalid data', async () => {
// createPersistentStore logs and swallows the parse error; silence
// the expected warn so it doesn't pollute test output, and assert it.
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
localStorage.setItem(STORAGE_KEY, 'invalid json');
const { LayoutManager } = await import('./layoutStore.svelte');
const manager = new LayoutManager();
expect(manager.mode).toBe('list');
expect(warnSpy).toHaveBeenCalled();
warnSpy.mockRestore();
});
it('should default to list mode when localStorage has empty object', async () => {