Add unit tests for frontend utilities and hooks

82 tests covering download.ts and all React Query hooks. API modules are
mocked with vi.mock; mutation tests spy on queryClient.invalidateQueries
to verify cache invalidation. Conditional queries (null id) are verified
to stay idle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-21 13:47:55 +01:00
parent c80d7d0802
commit 0d2f419c6a
11 changed files with 1069 additions and 20 deletions

View File

@@ -24,5 +24,5 @@ Add comprehensive unit and integration test coverage to both the backend (FastAP
- [ ] Backend schemas and services have unit test coverage
- [x] Backend API endpoints have integration test coverage
- [x] Frontend test infrastructure is set up (Vitest, RTL)
- [ ] Frontend utilities and hooks have unit test coverage
- [x] Frontend utilities and hooks have unit test coverage
- [ ] Frontend components have basic render/interaction tests