Summary
desktop/src/core/ThemeEngine.ts implements the theme mode state (dark/light), persistence via localStorage (key \riday-theme), and emits a \ heme:change\ event through EventBus. It currently has no test file.
Goal
Create desktop/src/test/ThemeEngine.test.ts covering:
- Default mode is \dark\
- \set()\ persists the choice to localStorage
- \get()\ returns the stored mode after a reload
- \set()\ emits a \ heme:change\ event via EventBus
- Invalid stored values fall back to \dark\
Tasks
- Write the Vitest test file (jsdom environment)
- Mock localStorage and EventBus where needed
- Follow the style of existing tests in desktop/src/test/
Acceptance criteria
Labels
good first issue, help wanted
Summary
desktop/src/core/ThemeEngine.ts implements the theme mode state (dark/light), persistence via localStorage (key \riday-theme), and emits a \ heme:change\ event through EventBus. It currently has no test file.
Goal
Create desktop/src/test/ThemeEngine.test.ts covering:
Tasks
Acceptance criteria
pm run test\ passes with the new file
Labels
good first issue, help wanted