refactor(web/test): default svelte-query mock in vitest.setup; remove from 34 files (B3)
This commit is contained in:
@@ -40,11 +40,6 @@ vi.mock('$lib/api/likes', () => ({
|
||||
// AlbumCard renders LikeButton, which calls useQueryClient() to get the
|
||||
// cache for invalidation. The page test isn't wrapped in a QueryClientProvider,
|
||||
// so we stub useQueryClient with a noop client.
|
||||
vi.mock('@tanstack/svelte-query', async (orig) => {
|
||||
const actual = (await orig()) as Record<string, unknown>;
|
||||
return { ...actual, useQueryClient: () => ({}) };
|
||||
});
|
||||
|
||||
import Page from './+page.svelte';
|
||||
|
||||
describe('/library/albums', () => {
|
||||
|
||||
Reference in New Issue
Block a user