mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Mock getBaseUrl in Audible service tests
Add a getBaseUrl mock to audibleServiceMock in audiobooks-browse route tests that returns 'https://www.audible.com'. This ensures tests have a defined base URL for Audible service calls and prevents issues caused by an undefined method during test execution.
This commit is contained in:
@@ -10,6 +10,7 @@ const prismaMock = createPrismaMock();
|
|||||||
const audibleServiceMock = vi.hoisted(() => ({
|
const audibleServiceMock = vi.hoisted(() => ({
|
||||||
search: vi.fn(),
|
search: vi.fn(),
|
||||||
getAudiobookDetails: vi.fn(),
|
getAudiobookDetails: vi.fn(),
|
||||||
|
getBaseUrl: vi.fn().mockReturnValue('https://www.audible.com'),
|
||||||
}));
|
}));
|
||||||
const enrichMock = vi.hoisted(() => vi.fn());
|
const enrichMock = vi.hoisted(() => vi.fn());
|
||||||
const currentUserMock = vi.hoisted(() => vi.fn());
|
const currentUserMock = vi.hoisted(() => vi.fn());
|
||||||
|
|||||||
Reference in New Issue
Block a user