mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +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
27484c4a41
commit
a23408d937
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