mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
test(m3): complete genreAlbumBrowse mock pulled in via album barrel
The album barrel reaches genreBrowsePlayback.test's transitive graph through the artist↔album edge (songToTrack → @/features/artist → @/features/album → useGenreAlbumBrowse), which needs GENRE_ALBUM_FIRST_PAGE from the partially mocked ./genreAlbumBrowse. Spread importOriginal so it stays real.
This commit is contained in:
@@ -26,7 +26,11 @@ vi.mock('./libraryReady', () => ({
|
||||
libraryIsReady: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('./genreAlbumBrowse', () => ({
|
||||
// Spread the real leaf module so other consumers pulled in transitively (the
|
||||
// album barrel reaches this via the artist↔album edge → useGenreAlbumBrowse needs
|
||||
// GENRE_ALBUM_FIRST_PAGE); only fetchGenreAlbumTotal is stubbed here.
|
||||
vi.mock('./genreAlbumBrowse', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('./genreAlbumBrowse')>()),
|
||||
fetchGenreAlbumTotal: vi.fn(),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user