fix(plugins): mangabaka type-specific external id namespaces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-30 15:50:51 +01:00
1 parent d9f935d8a8
commit 2573c83f70
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ describe("mangabaka", () => {
const a = recs[0]!;
if (a.kind !== "entry") throw new Error();
expect(a.entry).toEqual({ status: "in_progress", rating: 80, notes: "good" });
expect(a.work.externalIds).toEqual({ mangabaka: "1", anilist: "11", mal: "22", mangaupdates: "33", kitsu: "44" });
expect(a.work.externalIds).toEqual({ mangabaka: "1", anilist_manga: "11", mal_manga: "22", mangaupdates: "33", kitsu_manga: "44" });
const p = recs[1]!;
if (p.kind !== "engagement") throw new Error();
expect(p.engagement.progress).toEqual({ chapter: 12, volume: 2 });
@@ -91,7 +91,7 @@ describe("mangabaka", () => {
test("lookup searches series", async () => {
const { h, ctx } = ctxFor({ [`GET ${B}/v1/series/search`]: search });
const r = await plugin.lookup!(ctx, { title: "Delta", mediaType: "manga" });
expect(r).toEqual([{ title: "Delta", mediaType: "manga", year: 2018, externalIds: { mangabaka: "5", anilist: "55" } }]);
expect(r).toEqual([{ title: "Delta", mediaType: "manga", year: 2018, externalIds: { mangabaka: "5", anilist_manga: "55" } }]);
expect(new URL(h.calls[0]!.url).searchParams.get("q")).toBe("Delta");
});
});