/** * Wave 0 stub — Broker: syncCalendar event upsert + all-day handling * * These tests are RED stubs. Implementation lives in: * apps/api/src/broker/sync.ts (Plan 03) * * Tests will be filled GREEN in Plan 03 when syncCalendar is implemented. * * Key behaviors to verify (D-13): * - All-day events: dtstart_date (DATE) set, dtstart_utc NULL, allDay=true * - Timed events: dtstart_utc (TIMESTAMP UTC) set, dtstart_date NULL, allDay=false * - UID used as idempotency key: second sync of same UID is an upsert, not duplicate */ import { describe, it } from 'vitest' describe('syncCalendar', () => { it.todo('stores all-day events with dtstart_date (DATE) and dtstart_utc=NULL (Plan 03)') it.todo('stores timed events with dtstart_utc (TIMESTAMP) and dtstart_date=NULL (Plan 03)') it.todo('sets allDay=true for all-day events, allDay=false for timed (Plan 03)') it.todo('upserts on duplicate UID within the same calendar (Plan 03)') it.todo('stores the raw VEVENT blob in rawVevent column (Plan 03)') it.todo('updates the calendar ctag/syncToken after a successful sync (Plan 03)') })