fix: harden production flows and user messaging
This commit is contained in:
1 parent
52dce168dd
commit
86dfe8053d
43 files changed
+3520
-358
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { expect, test } from "vitest";
|
||||
|
||||
import { monthPeriod, quarterPeriod, type BillingPeriod } from "./period";
|
||||
import { berlinMonthPeriodAt, monthPeriod, quarterPeriod, type BillingPeriod } from "./period";
|
||||
|
||||
test("converts a Berlin month to an exclusive UTC range", () => {
|
||||
expect(monthPeriod(2026, 3)).toEqual({
|
||||
@@ -9,6 +9,13 @@ test("converts a Berlin month to an exclusive UTC range", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("selects the Berlin calendar month at a UTC month-edge instant", () => {
|
||||
expect(berlinMonthPeriodAt(new Date("2026-03-31T22:30:00.000Z"))).toEqual({
|
||||
fromUtc: new Date("2026-03-31T22:00:00.000Z"),
|
||||
toUtcExclusive: new Date("2026-04-30T22:00:00.000Z"),
|
||||
});
|
||||
});
|
||||
|
||||
test("converts a Berlin month in full summer (CEST) to an exclusive UTC range", () => {
|
||||
expect(monthPeriod(2026, 8)).toEqual({
|
||||
fromUtc: new Date("2026-07-31T22:00:00.000Z"),
|
||||
@@ -68,4 +75,4 @@ test("supports an explicit timezone override", () => {
|
||||
fromUtc: new Date("2026-03-01T05:00:00.000Z"),
|
||||
toUtcExclusive: new Date("2026-04-01T04:00:00.000Z"),
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user