diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-03 00:33:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-03 00:43:17 +0900 |
| commit | 0d56a04d770c2df492ecf59c941e8d90578b0b60 (patch) | |
| tree | ea62a0096ef03128be2c4f329eaa2d8592019d32 /src/client/pages/StudyPage.test.tsx | |
| parent | 66bfde575d973fea9fb26139af421ab5b18c5bea (diff) | |
| download | kioku-0d56a04d770c2df492ecf59c941e8d90578b0b60.tar.gz kioku-0d56a04d770c2df492ecf59c941e8d90578b0b60.tar.zst kioku-0d56a04d770c2df492ecf59c941e8d90578b0b60.zip | |
feat(study): shuffle cards when starting study session
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 <noreply@anthropic.com>
Diffstat (limited to 'src/client/pages/StudyPage.test.tsx')
| -rw-r--r-- | src/client/pages/StudyPage.test.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
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: <T,>(array: T[]): T[] => [...array], +})); + vi.mock("../api/client", () => ({ apiClient: { login: vi.fn(), |
