From 1edc9e90ca8a3bd1a354fb0a6698261fda851793 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 11:17:52 -0600 Subject: [PATCH] fix(pm-stack/aggregator): normalise prediction latest to null in reset-duration ledger test The ledger row resets field is string | null (production builds it as r.prediction?.latest ?? null), so the test now applies the same normalisation instead of passing string | undefined to toBe. --- pm-stack/aggregator/src/quota-reset-duration.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pm-stack/aggregator/src/quota-reset-duration.test.ts b/pm-stack/aggregator/src/quota-reset-duration.test.ts index 12ffb719c..9fb994d4b 100644 --- a/pm-stack/aggregator/src/quota-reset-duration.test.ts +++ b/pm-stack/aggregator/src/quota-reset-duration.test.ts @@ -253,7 +253,7 @@ describe("buildResetDurationLedgerRows", () => { expect(rows[0].source).toBe("quota-prediction"); expect(rows[0].id).toBe(predicted[0].id); expect(rows[0].ts).toBe(AS_OF); - expect(rows[0].resets).toBe(predicted[0].prediction?.latest); + expect(rows[0].resets).toBe(predicted[0].prediction?.latest ?? null); expect((rows[0].payload as { kind?: string }).kind).toBe("reset_duration"); expect(rows[1].resets).toBeNull(); });