From 98a2cc2813c641b195aa019d5acd57fa2c6a5763 Mon Sep 17 00:00:00 2001 From: kikootwo Date: Thu, 12 Feb 2026 16:09:55 -0500 Subject: [PATCH] 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. --- tests/api/audiobooks-browse.routes.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/api/audiobooks-browse.routes.test.ts b/tests/api/audiobooks-browse.routes.test.ts index ff90130..9ffe21c 100644 --- a/tests/api/audiobooks-browse.routes.test.ts +++ b/tests/api/audiobooks-browse.routes.test.ts @@ -10,6 +10,7 @@ const prismaMock = createPrismaMock(); const audibleServiceMock = vi.hoisted(() => ({ search: vi.fn(), getAudiobookDetails: vi.fn(), + getBaseUrl: vi.fn().mockReturnValue('https://www.audible.com'), })); const enrichMock = vi.hoisted(() => vi.fn()); const currentUserMock = vi.hoisted(() => vi.fn());