Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -0,0 +1,24 @@
import { describe, expect, it } from "vitest";
import { MAX_MOLLIE_PAYMENT_LIFETIME_MS, MOLLIE_RECONCILIATION_GRACE_MS, resolvePaymentReservation } from "./payment-reservation.js";
describe("Mollie product-acquisition reservation", () => {
const now = new Date("2026-07-17T12:00:00.000Z");
it("uses the provider expiry plus reconciliation grace", () => {
expect(resolvePaymentReservation({ expiresAt: "2026-07-30T12:00:00.000Z" }, now)).toEqual({
expiresAt: new Date("2026-08-01T12:00:00.000Z"),
trusted: true,
});
});
it.each([null, "invalid", "2026-07-17T11:59:59.000Z", "2027-01-01T00:00:00.000Z"])(
"quarantines an untrusted provider expiry %s under a bounded deadline",
(expiresAt) => {
expect(resolvePaymentReservation({ expiresAt }, now)).toEqual({
expiresAt: new Date(now.getTime() + MAX_MOLLIE_PAYMENT_LIFETIME_MS + MOLLIE_RECONCILIATION_GRACE_MS),
trusted: false,
});
},
);
});