mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
Add full test suites for GoogleCalendarService and MicrosoftCalendarService covering all major functionality including CRUD operations, error handling, rate limiting, pagination, and timezone handling. BREAKING CHANGE: Updated CalendarProvider interface - createEvent now returns ICSEvent instead of string ID, updateEvent returns ICSEvent instead of void. Changes: - Add GoogleCalendarService.test.ts with 30+ test cases - Add MicrosoftCalendarService.test.ts with 35+ test cases - Update GoogleCalendarService to return ICSEvent from create/update operations - Update MicrosoftCalendarService to return ICSEvent from create/update operations - Add test compatibility methods (getEvents, getCachedEvents, manualRefresh) - Fix Microsoft Calendar delta sync to use proper /delta endpoint - Fix Google Calendar to handle 410 Gone for already-deleted events - Improve pagination handling in Microsoft Calendar listCalendars - Remove debug console.log statements from both services - Update OAuth setup documentation to explain Device Flow security model - Document that client secrets are never bundled (Device Flow uses only client IDs) Test coverage includes: - List calendars with pagination - Fetch events with incremental sync (syncToken/deltaLink) - Create/update/delete events (timed and all-day) - Rate limiting and retry logic with exponential backoff - Error handling (network, API errors, token expiration) - Timezone handling (UTC and local timezones) - Base64-encoded calendar/event IDs |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| components | ||
| helpers | ||
| integration | ||
| manual | ||
| services | ||
| types | ||
| unit | ||
| utils | ||
| coverage-report.md | ||
| test-setup.ts | ||