test(coach): start every snapshot case with no readings

The query-shape case read the measurement mock without setting it and
passed only after a case that left rows behind.
This commit is contained in:
Marc-André Bombeck committed 2026-11-03 22:25:43 +01:00
1 parent 1ac69420d5
commit a598b00081
1 file changed
+3
@@ -94,6 +94,9 @@ describe("buildCoachSnapshot — Apple Health additive metrics (v1.4.23)", () =>
// for 60 s; reset between tests so each fixture is read fresh.
__resetCoachSnapshotCacheForTests();
resolveModuleMapMock.mockResolvedValue(allModulesEnabled());
// No readings unless a case seeds its own; the case that only inspects
// the query used to inherit whatever rows the case before it left.
prismaMock.measurement.findMany.mockResolvedValue([]);
prismaMock.moodEntry.findMany.mockResolvedValue([]);
prismaMock.medicationIntakeEvent.findMany.mockResolvedValue([]);
prismaMock.medication.findMany.mockResolvedValue([]);