From e1d80af9899e078f53d2232d2d7ef4680a14bf1c Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 8 Sep 2026 10:11:26 +0200 Subject: Never-done routines are always at least due A routine with no completions shows due instead of ok, even right after creation; ok requires a completion within the current period. --- src/lib/shared/routine-metrics.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/shared/routine-metrics.test.ts') diff --git a/src/lib/shared/routine-metrics.test.ts b/src/lib/shared/routine-metrics.test.ts index 1df39ab..ccc06ba 100644 --- a/src/lib/shared/routine-metrics.test.ts +++ b/src/lib/shared/routine-metrics.test.ts @@ -18,10 +18,10 @@ const routine = { }; describe('computeRoutineState', () => { - it('is ok and healthy before the due date', () => { + it('is due when never done, even before the due date', () => { const now = Date.parse(CREATED) + 3 * DAY_MS; const state = computeRoutineState(routine, [], now); - expect(state.status).toBe('ok'); + expect(state.status).toBe('due'); expect(state.overdueDays).toBe(0); expect(state.health).toBe(100); expect(state.dueAt).toBe( -- cgit v1.3