Context
npm run test:unit covers geo/share/places/places-api/city-pages/jsonld/og/changelog/awesome-list, but several lib modules have zero coverage:
| Module |
What to test |
src/lib/user-places.ts |
mapping (userPlaceToPlace), error classification |
src/lib/user-events.ts |
CRUD payload shapes, date handling |
src/lib/utils.ts |
isMissingTableError() against real Postgres error shapes (code 42P01 etc.) |
src/lib/map.ts |
directionsUrl() output format |
src/lib/exam-dates.ts |
structural invariants: sorted dates, required fields, no past-dated events still marked upcoming |
Supabase-dependent modules need the client mocked (vitest module mocking); the pure ones are trivial wins.
Acceptance criteria
Context
npm run test:unitcovers geo/share/places/places-api/city-pages/jsonld/og/changelog/awesome-list, but several lib modules have zero coverage:src/lib/user-places.tsuserPlaceToPlace), error classificationsrc/lib/user-events.tssrc/lib/utils.tsisMissingTableError()against real Postgres error shapes (code42P01etc.)src/lib/map.tsdirectionsUrl()output formatsrc/lib/exam-dates.tsSupabase-dependent modules need the client mocked (vitest module mocking); the pure ones are trivial wins.
Acceptance criteria
npm run test:unit