fix(targets): read the seven-day basis as one aggregate instead of the whole summary slice

This commit is contained in:
Marc-André Bombeck committed 2026-10-16 05:49:51 +02:00
1 parent 13c74c4e92
commit abbb424d21
4 files changed
+111 -10

No files matched your search

@@ -39,10 +39,10 @@ vi.mock("@/lib/targets/glucose-read", async (importOriginal) => ({
vi.mock("@/lib/analytics/resting-pulse-read", () => ({
readRestingPulseProxy: vi.fn(),
}));
// The verdict's basis: the dashboard's summary slice. Empty here, so every
// item is placed with its own value (`targetVerdictReference`).
// The verdict's basis: the dashboard's seven-day means. Empty here, so every
// item is placed with its newest reading, else its own value.
vi.mock("@/lib/analytics/summaries-slice", () => ({
computeSummariesSlice: vi.fn(async () => ({ summaries: {} })),
readSevenDayMeans: vi.fn(async () => ({})),
}));
vi.mock("@/lib/db", () => ({