From ac7d6f3ed8937ad254f70dee9c9dc6749fae8105 Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Fri, 23 Oct 2026 15:13:51 -0400 Subject: [PATCH] Quota test: use the current time instead of a fixed date The rolling-window test broke once the hard-coded date was more than a day old, because entries older than 24 h are pruned on every write. Co-Authored-By: Claude Opus 5.5 --- connector/test/quota.test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/test/quota.test.mjs b/connector/test/quota.test.mjs index 310ea91..6f6b7c0 100644 --- a/connector/test/quota.test.mjs +++ b/connector/test/quota.test.mjs @@ -67,7 +67,7 @@ test("YouTube's budget is shared by all clients; per-account platforms are separ test("rolling 24 h windows free up when the oldest post ages out", () => { reset(); - const at = Date.parse("2026-10-21T12:00:00Z"); + const at = Date.now(); // relative to now: entries older than 24 h are pruned on every write const first = at - 20 * H; quota.record("tiktok", "acct", "publish", first); for (let i = 1; i < 15; i++) quota.record("tiktok", "acct", "publish", at - H);