24 tests covering the complex store interactions that pure-function
tests cannot reach:
- cyclesStore.createCycle auto-closes the previous open cycle and
computes length, but leaves future cycles untouched when backfilling
- cyclesStore.setPeriodEnd separates "end of bleeding" from endDate
- dayLogsStore.logDay upserts per date (no duplicates even across
multiple partial updates)
- Auto-start cycle fires on bleeding flow with no history or after a
closed cycle >= 10 days old, but NOT for spotting or mid-cycle bleeds
- Auto-end period sets periodEndDate after 2 dry days, does not
re-trigger on already-ended cycles
- Symptom reference counters adjust correctly when a log is created,
updated (adds/removes symptoms), and deleted
- autoAssignCycle retroactively attaches orphan logs to a newly
created cycle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>