- Fix assertions on constants in clipboard.rs (use const blocks)
- Fix unnecessary unwrap after is_ok check in git.rs
- Remove redundant u64 >= 0 comparison in stats.rs
- Add #[allow(clippy::useless_vec)] to sorting tests
- Add missing beforeEach import to vitest.setup.ts
- Change global.Audio to globalThis.Audio in notifications.test.ts
- Add type annotations to fix null type narrowing in conversations.test.ts
- Remove unused imports in config.test.ts and conversations.test.ts
- Remove unused handler variable in tauri.test.ts
- Remove unused _args parameter in vitest.setup.ts mock
- Add coverage/ to eslint ignore list
- Run frontend tests with coverage thresholds (15% lines/statements)
- Add llvm-tools-preview component for Rust coverage
- Install cargo-llvm-cov and enforce 50% line coverage for backend
- CI will now fail if coverage drops below thresholds
- Add @vitest/coverage-v8 for frontend test coverage
- Configure vitest with coverage thresholds (15% statements/lines, 13% branches/functions)
- Add npm scripts for backend testing and coverage with cargo-llvm-cov
- Add test:all and coverage:all scripts for unified test execution
- Exclude coverage directory from git tracking
Backend (177 new tests):
- achievements.rs: 108 tests covering all achievement categories, unlock logic,
serialization, and progress tracking
- commands.rs: 19 tests for validate_directory, get_file_size, and struct serialization
- git.rs: 31 tests with real temporary git repos for status, diff, stage, commit, log
- clipboard.rs: 19 tests for ClipboardEntry, ClipboardHistory, sorting, and filtering
Frontend (141 new tests):
- stats.test.ts: 19 tests for stats store and formattedStats derived store
- config.test.ts: 40 tests for theme, font size, path masking, and config store
- slashCommands.test.ts: 48 tests for parseSlashCommand, getMatchingCommands, isSlashCommand
- notifications.test.ts: 34 tests for NotificationType, NOTIFICATION_SOUNDS, SoundPlayer
Total test count increased from ~55 to 373 tests (216 backend + 157 frontend)