test(plugins): fix mangabaka upsert-without-entry fixture
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f30c0db2b1
commit
d9f935d8a8
@@ -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([]);
|
||||
|
||||
Reference in New Issue
Block a user