test(web): the search and liked page tests take page() from the shared fixture (DRY W10)

Four test files defined the same Page<T> envelope helper; they now import
it from test-utils/fixtures/page.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 03:22:07 -05:00
co-authored by Claude Opus 5.5
parent c290667b8a
commit 5f88fe941d
4 changed files with 7 additions and 15 deletions
+1 -3
View File
@@ -27,14 +27,12 @@ vi.mock('#lib/player/store.svelte.js', () => ({
import LikedPage from './+page.svelte';
import {
import { page } from '#test-utils/fixtures/page.js';
createLikedTracksInfiniteQuery,
createLikedAlbumsInfiniteQuery,
createLikedArtistsInfiniteQuery
} from '#lib/api/likes.js';
function page<T>(items: T[], total: number, offset = 0, limit = 50): Page<T> {
return { items, total, offset, limit };
}
afterEach(() => vi.clearAllMocks());