feat(portal): add SSR operations and exclusive groups
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { fillDailySeries } from "./admin-metrics";
|
||||
|
||||
describe("admin dashboard metrics", () => {
|
||||
it("fills missing UTC registration days with zero", () => {
|
||||
expect(fillDailySeries(
|
||||
[{ day: "2026-07-30", count: 2 }, { day: "2026-08-01", count: 1 }],
|
||||
new Date("2026-08-01T22:00:00Z"),
|
||||
3,
|
||||
)).toEqual([
|
||||
{ day: "2026-07-30", count: 2 },
|
||||
{ day: "2026-07-31", count: 0 },
|
||||
{ day: "2026-08-01", count: 1 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user