Add utilities and initial test coverage

This commit is contained in:
beatz174-bit
2025-12-01 16:07:31 +10:00
parent a86723004b
commit ff0b2959b5
15 changed files with 462 additions and 160 deletions
+18
View File
@@ -0,0 +1,18 @@
# Testing
Run the unit and component test suite with:
```
npm test
```
For coverage reports:
```
npm run test:coverage
```
## Test utilities
- `src/testUtils/mockDb.ts` provides a lightweight `createMockDb` factory with `MockTable` helpers that mimic Dexie tables used in the app.
- `src/testUtils/stubDownloads.ts` stubs `document.createElement` and `URL.createObjectURL`/`revokeObjectURL` so download paths can be exercised in tests.