Commit 8f82db9
committed
Phase 2 WIP: MSW setup + useBoards tests complete
Progress:
- Set up MSW (Mock Service Worker) for API mocking
- Created comprehensive MSW handlers for all API endpoints
- Configured environment variables for test API URLs
- Wrote 14 passing tests for useBoards hook
Tests Implemented (useBoards):
- GetBoards query (loading, success, error states)
- GetBoard query (single board fetch, multiple IDs)
- createBoard mutation (success, error, org_id validation)
- updateBoardTitle mutation (success, error)
- deleteBoard mutation (success, error)
- Cache invalidation after mutations
Files Created/Modified:
- src/__tests__/setup.ts - Added MSW server setup
- src/__tests__/utils/server-handlers.ts - MSW handlers for all endpoints
- src/__tests__/unit/hooks/useBoards.test.ts - 14 tests
- vitest.config.ts - Added test environment variables
- client/docs/client-testing/phase-2.md - Phase planning doc
Test Results: ✅ 14/14 useBoards tests passing
Next: useLists, useCards, useCardDetails, useCardFilters, useBulkActions
Phase 2 Status: ~20% complete (14/72+ tests)1 parent 8a07b5e commit 8f82db9
File tree
5 files changed
+1119
-1
lines changed- client
- docs/client-testing
- src/__tests__
- unit/hooks
- utils
5 files changed
+1119
-1
lines changed
0 commit comments