The project currently has zero automated tests — no test framework installed, no *.test.*/*.spec.* files anywhere in src/ or electron/.
Why Vitest
Fits naturally with the existing Vite build setup, fast, minimal config, good TypeScript + React support (via @testing-library/react).
Scope
npm install -D vitest @testing-library/react @testing-library/jest-dom jsdom
- Add a
test script and basic vitest.config.ts (reusing vite.config.ts aliases)
- Wire
npm test into release.yml's test job so it's a real CI gate
- Initial coverage targets (highest value first):
electron/main.ts: getFileType() extension classification, scanFolder() filtering/sorting
- Settings persistence round-trip (get/save via the IPC handlers)
FileViewer/CompletionScreen state transitions (delete/keep/undo)
- Not aiming for full coverage in the first pass — establish the harness and cover the riskiest logic (file classification, undo stack) first
The project currently has zero automated tests — no test framework installed, no
*.test.*/*.spec.*files anywhere insrc/orelectron/.Why Vitest
Fits naturally with the existing Vite build setup, fast, minimal config, good TypeScript + React support (via
@testing-library/react).Scope
npm install -D vitest @testing-library/react @testing-library/jest-dom jsdomtestscript and basicvitest.config.ts(reusingvite.config.tsaliases)npm testintorelease.yml'stestjob so it's a real CI gateelectron/main.ts:getFileType()extension classification,scanFolder()filtering/sortingFileViewer/CompletionScreenstate transitions (delete/keep/undo)