diff --git a/frontend/src/components/LibraryPlayer.dom.test.tsx b/frontend/src/components/LibraryPlayer.dom.test.tsx index 38e119b6..8e4ba9e5 100644 --- a/frontend/src/components/LibraryPlayer.dom.test.tsx +++ b/frontend/src/components/LibraryPlayer.dom.test.tsx @@ -11,6 +11,8 @@ vi.mock("react-i18next", async (importOriginal) => { const actual = await importOriginal(); return { ...actual, useTranslation: () => ({ t: (key: string) => key }) }; }); +const expose = vi.hoisted(() => vi.fn()); +vi.mock("../lib/browserBackgroundPlay", () => ({ exposeVideoToBackgroundPlay: expose })); import LibraryPlayer from "./LibraryPlayer"; import type { DownloadJob } from "../lib/api"; @@ -90,6 +92,11 @@ describe("LibraryPlayer", () => { expect(document.body.querySelector("audio")).toBeNull(); }); + it("hands its