1import { assertEquals } from "@std/assert";23import { buildInitialDailyControllerState } from "@/lib/shikaku/daily_controller_state.ts";45Deno.test("buildInitialDailyControllerState opens today's top unlocked stack", () => {6 assertEquals(7 buildInitialDailyControllerState({8 date: "2026-04-17",9 today: "2026-04-17",10 selectedStackIndex: 0,11 playableStackIndex: 2,12 visibleMaxStack: 1,13 }),14 {15 selectedStack: 2,16 playableStack: 2,17 visibleMaxStack: 2,18 },19 );20});2122Deno.test("buildInitialDailyControllerState keeps past dates on their saved top stack", () => {23 assertEquals(24 buildInitialDailyControllerState({25 date: "2026-04-16",26 today: "2026-04-17",27 selectedStackIndex: 2,28 playableStackIndex: 0,29 visibleMaxStack: 2,30 }),31 {32 selectedStack: 2,33 playableStack: 0,34 visibleMaxStack: 2,35 },36 );37});