mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
test(ui): add getCookie to cookieUtils mock in user_dashboard test
user_dashboard.tsx imports getCookie from @/utils/cookieUtils, but the vi.mock factory in user_dashboard.test.tsx only exports clearTokenCookies. Vitest throws `No "getCookie" export is defined on the "@/utils/cookieUtils" mock`, breaking all three beforeunload-listener tests. Add getCookie to the mock factory so it matches the current imports.
This commit is contained in:
parent
43efe76f17
commit
bdaaa5c187
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ vi.mock("jwt-decode", () => ({
|
|||
// Mock cookie utility
|
||||
vi.mock("@/utils/cookieUtils", () => ({
|
||||
clearTokenCookies: vi.fn(),
|
||||
getCookie: vi.fn().mockReturnValue("fake-jwt-token"),
|
||||
}));
|
||||
|
||||
// Mock fetchTeams
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue