test(offline): mock useOfflineBrowseReloadToken submodule in useSongBrowseList

The offline move collapsed a single-module mock into a `@/features/offline`
barrel mock, which shadowed the real `useOfflineBrowseContext` the test relied
on. Mock the reload-token submodule directly so the barrel re-exports the stub
while the sibling context hook stays live.
This commit is contained in:
Psychotoxical
2026-06-30 01:08:35 +02:00
parent 321d5ff6ab
commit 17ea96dcdb
45 changed files with 4 additions and 1 deletions
+4 -1
View File
@@ -18,7 +18,10 @@ vi.mock('../utils/library/advancedSearchLocal', () => ({
runLocalSongBrowse: vi.fn(async () => []),
}));
vi.mock('@/features/offline', () => ({
// Only the reload-token hook was stubbed pre-move (its own module); mock that
// submodule directly so the barrel re-exports the stub while the real
// `useOfflineBrowseContext` (a different submodule) stays live.
vi.mock('@/features/offline/hooks/useOfflineBrowseReloadToken', () => ({
useOfflineBrowseReloadToken: () => undefined,
}));