refactor(web/test): default svelte-query mock in vitest.setup; remove from 34 files (B3)

This commit is contained in:
2026-05-08 11:08:41 -04:00
parent 923b8286ee
commit 3e34f1f7b3
35 changed files with 12 additions and 192 deletions
@@ -7,11 +7,6 @@ import type { CoverProvider, SMTPConfig } from '$lib/api/admin';
// useQueryClient is wrapped so the page can call invalidateQueries() without
// a real QueryClient context. Everything else from svelte-query passes through.
const invalidateQueries = vi.fn();
vi.mock('@tanstack/svelte-query', async (orig) => {
const actual = (await orig()) as Record<string, unknown>;
return { ...actual, useQueryClient: () => ({ invalidateQueries }) };
});
vi.mock('$lib/api/admin', () => ({
createLidarrConfigQuery: vi.fn(),
createQualityProfilesQuery: vi.fn(),