From 2802202c583d1e7a3953d35b68caf9b102b4df70 Mon Sep 17 00:00:00 2001 From: Ninym Date: Mon, 20 Apr 2026 11:38:29 +0200 Subject: [PATCH] test(day-aggregator): drop Z suffix so firstTimestamp test is timezone-stable The test fed '2026-04-09T23:59:00Z' into dateKey(), which parses to local time. In UTC+ timezones that resolved to 2026-04-10 01:59 local, making the assertion 'date === 2026-04-09' fail for every contributor east of UTC while passing on CI and for US-based maintainers. Dropping the Z makes the ISO string be parsed as local time, so 23:59 on 2026-04-09 is 23:59 on 2026-04-09 everywhere. The test still exercises the boundary-date bucketing intent (firstTimestamp 23:59, lastTimestamp crosses midnight) but no longer depends on the runner's timezone. --- tests/day-aggregator.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/day-aggregator.test.ts b/tests/day-aggregator.test.ts index fb90840..5a818e3 100644 --- a/tests/day-aggregator.test.ts +++ b/tests/day-aggregator.test.ts @@ -135,8 +135,8 @@ describe('aggregateProjectsIntoDays', () => { sessions: [{ sessionId: 's1', project: 'p', - firstTimestamp: '2026-04-09T23:59:00Z', - lastTimestamp: '2026-04-10T00:10:00Z', + firstTimestamp: '2026-04-09T23:59:00', + lastTimestamp: '2026-04-10T00:10:00', totalCostUSD: 1, totalInputTokens: 0, totalOutputTokens: 0, totalCacheReadTokens: 0, totalCacheWriteTokens: 0, apiCalls: 0,