From 0d56a04d770c2df492ecf59c941e8d90578b0b60 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 3 Jan 2026 00:33:56 +0900 Subject: feat(study): shuffle cards when starting study session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cards are now randomized using Fisher-Yates algorithm to improve learning by preventing users from memorizing card order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/pages/StudyPage.test.tsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/client/pages/StudyPage.test.tsx') diff --git a/src/client/pages/StudyPage.test.tsx b/src/client/pages/StudyPage.test.tsx index edf683a..c257b24 100644 --- a/src/client/pages/StudyPage.test.tsx +++ b/src/client/pages/StudyPage.test.tsx @@ -14,6 +14,11 @@ const mockStudyGet = vi.fn(); const mockStudyPost = vi.fn(); const mockHandleResponse = vi.fn(); +// Mock shuffle to return array in original order for predictable tests +vi.mock("../utils/shuffle", () => ({ + shuffle: (array: T[]): T[] => [...array], +})); + vi.mock("../api/client", () => ({ apiClient: { login: vi.fn(), -- cgit v1.2.3-70-g09d2