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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user