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
@ -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…
Reference in New Issue
Block a user