diff options
Diffstat (limited to 'src/lib/server')
| -rw-r--r-- | src/lib/server/services/routines.test.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/server/services/routines.test.ts b/src/lib/server/services/routines.test.ts index 04151c2..22b49ff 100644 --- a/src/lib/server/services/routines.test.ts +++ b/src/lib/server/services/routines.test.ts @@ -134,9 +134,8 @@ describe('routines service', () => { const r = await add(projectId, 'clean kitchen', 7, db); const createdAt = Date.parse(r.createdAt); await complete(r.id, null, new Date(createdAt).toISOString(), db); - - // 15 days after completion with a 7-day routine => very late - const now = createdAt + 15 * DAY_MS; + // 22 days after completion with a 7-day routine => two periods overdue + const now = createdAt + 22 * DAY_MS; const dashboard = await loadProjectDashboard(projectId, now, db); expect(dashboard.routines).toHaveLength(1); expect(dashboard.routines[0].status).toBe('veryLate'); |
