From d9f935d8a85a8cbd4daa342a32112815c6b16bb6 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Fri, 30 Oct 2026 15:50:44 +0100 Subject: [PATCH] test(plugins): fix mangabaka upsert-without-entry fixture Co-Authored-By: Claude Opus 5.5 --- plugins/mangabaka/test/mangabaka.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mangabaka/test/mangabaka.test.ts b/plugins/mangabaka/test/mangabaka.test.ts index 4e438fa..7bc8c49 100644 --- a/plugins/mangabaka/test/mangabaka.test.ts +++ b/plugins/mangabaka/test/mangabaka.test.ts @@ -68,7 +68,10 @@ describe("mangabaka", () => { test("upsert without entry is skipped and logged, never deleted", async () => { const logs: string[] = []; - const h = createFixtureHttp({ [`GET ${B}/v2/my/library/changes`]: { data: [{ type: "upsert", series_id: 4 }], next_cursor: "c" } }); + const h = createFixtureHttp({ + [`GET ${B}/v2/my/library/changes`]: (req: Request) => + new URL(req.url).searchParams.has("cursor") ? { data: [], next_cursor: "c" } : { data: [{ type: "upsert", series_id: 4 }], next_cursor: "c" }, + }); const ctx = createTestContext({ fetch: h.fetch, config: { token: "tok" }, log: (m) => logs.push(m) }); const recs = await collect(plugin.pullChanges!(ctx)); expect(recs).toEqual([]);