Files
HealthLog/src/lib/medications
Marc-André Bombeck 01cc1f78cd test(medications): drift-guard between category enum and label-key map
The medication category enum lives in three places (Prisma schema,
MEDICATION_CATEGORY_VALUES, MEDICATION_CATEGORY_KEYS). A new bucket
added to the enum without a matching label key would silently fall
back to categoryOther in <MedicationCard>. Pin the invariant with a
vitest assertion that every non-OTHER value resolves to a distinct
label key, plus a positive check that the fallback still fires for
unknown categories.
2026-05-17 17:23:30 +02:00
..