New file tests/experimentDailyStatuses.test.js — 9 tests covering
GET /api/experiments/:id/daily-statuses:
- 404 on unknown experiment
- all statuses returned when no filter
- analysisOnly=true keeps only non-null analysis_summary records
- analysisOnly=true returns [] when none have analysis_summary
- the exact null/object mix that caused the production 500 now passes
- analysisOnly=false (explicit) returns all records
- ?date= param is forwarded to Prisma correctly
- empty-array response on zero statuses
- returned records include expected fields
Fixed tests/calendar.test.js: existing tests were silently broken by the
cache added in the perf commit. Both test files now mock lib/cache to
always miss, so each test exercises the real route logic in isolation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>