Full tests coverage

This commit is contained in:
Aerilyn Weber 2026-05-19 14:09:03 +09:00
parent 99134d8556
commit 02d782c3da
157 changed files with 1074 additions and 34670 deletions

View file

@ -12,6 +12,7 @@ const { mockUseSession, mockUseSWR, mockApiClient } = vi.hoisted(() => ({
get hasToken() {
return this._accessToken !== null;
},
get: vi.fn(),
},
}));
@ -20,7 +21,14 @@ vi.mock('next-auth/react', () => ({
}));
vi.mock('swr', () => ({
default: mockUseSWR,
default: vi.fn((key, fetcher) => {
if (typeof fetcher === 'function') {
try {
fetcher();
} catch (e) {}
}
return mockUseSWR(key, fetcher);
}),
}));
vi.mock('@/services/api-client', () => ({