fix(api): correct DB mock setup for extracted groombook/api test suite #397

Closed
groombook-engineer[bot] wants to merge 2 commits from fix/GRO-1108-test-mocks into dev

2 Commits

Author SHA1 Message Date
Chris Farhood 67552197ed fix(api): correct DB mock setup for extracted groombook/api test suite
- Add mocks/db.ts shared mock factory with table proxies for all 31 tables
  (@groombook/db exports) including all SQL helpers and enum types
- waitlist.test.ts: portalAudit middleware now calls db.insert() as a side-
  effect after each request; filter inserts to only count actual waitlist
  entry inserts (petId/serviceId present), not audit log inserts
- All 288 API tests pass

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-14 05:38:32 +00:00
Chris Farhood a7838b3785 feat(GRO-106): STOP/HELP compliance + consent log
- Add detectKeyword() and handleConsentKeyword() in consent.ts
- Wire keyword detection into handleMessageReceived() in inbound.ts
- Add 25-unit test suite for consent.ts covering all keywords,
  case insensitivity, whitespace tolerance, idempotency, and
  help keyword state preservation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-14 04:58:48 +00:00