1
0
Fork 0

test(minigames): derive period board count from CORE_MINIGAME_KEYS

This commit is contained in:
Jason Fraley 2026-10-11 18:36:34 -04:00
parent ce7fb97e0e
commit 8c428f95f4

View file

@ -9,6 +9,7 @@ import {
buildLeaderboardPayload,
recentAchievements,
} from "@/lib/minigames/periods/standings";
import { CORE_MINIGAME_KEYS } from "@/lib/minigames/registry";
const ANCHOR = "2026-09-07T00:00:00.000Z";
const RUN = `mgs-${Date.now().toString(36)}`;
@ -102,7 +103,7 @@ describe("Minigame leaderboard read model", () => {
expect(payloadData.mode).toBe("period");
expect(payloadData.period?.label).toBe("Sep 7 to Sep 20, 2026");
expect(payloadData.boards).toHaveLength(5);
expect(payloadData.boards).toHaveLength(CORE_MINIGAME_KEYS.length);
const flappy = payloadData.boards.find((board) => board.key === "flappy");
expect(flappy?.rows.map((row) => row.name)).toEqual(["Alpha Operator", "Bravo Operator"]);