Full tests coverage
This commit is contained in:
parent
99134d8556
commit
02d782c3da
157 changed files with 1074 additions and 34670 deletions
|
|
@ -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', () => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue