aboutsummaryrefslogtreecommitdiff
path: root/src/lib/server/services/routines.test.ts
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-08 13:44:59 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-08 13:44:59 +0200
commit212c3adc8a584e6517a2816fc6683688d5ac5d7a (patch)
tree59cccb6155a739376fce05faa833076ac4b52ad4 /src/lib/server/services/routines.test.ts
parente1d80af9899e078f53d2232d2d7ef4680a14bf1c (diff)
Project health chart on LayerChart
Project page gets a Sante chart: daily mean of per-routine health via computeProjectHealthSeries, ending at the current health score. Both charts share a HealthChart component built on LayerChart's AreaChart (time x-axis, fixed 0-100 y-axis, completion dots).
Diffstat (limited to 'src/lib/server/services/routines.test.ts')
-rw-r--r--src/lib/server/services/routines.test.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/server/services/routines.test.ts b/src/lib/server/services/routines.test.ts
index e8c4f35..04151c2 100644
--- a/src/lib/server/services/routines.test.ts
+++ b/src/lib/server/services/routines.test.ts
@@ -141,6 +141,9 @@ describe('routines service', () => {
expect(dashboard.routines).toHaveLength(1);
expect(dashboard.routines[0].status).toBe('veryLate');
expect(dashboard.healthScore).toBe(0);
+ const last = dashboard.healthSeries[dashboard.healthSeries.length - 1];
+ expect(last.at).toBe(now);
+ expect(last.health).toBe(dashboard.healthScore);
});
it('overview aggregates per-project health and a global score', async () => {