refactor(userscript): thread seriesId through latest-chapter scan

This commit is contained in:
2026-08-03 17:04:19 +07:00
parent 78eaecb119
commit b96caf13e6
2 changed files with 16 additions and 4 deletions
+10
View File
@@ -264,6 +264,16 @@ test("comix latest returns null when no chapter links are present", () => {
assert.equal(comix.latestChapterFromAnchors(anchorsFromHTML("<a href='/browse'>x</a>"), "n8we"), null);
});
test("asura and demonic ignore the seriesId argument", () => {
const asuraAnchors = anchorsFromHTML(
`<a href="/comics/x-aabbccdd/chapter/12"><span>Chapter 12</span></a>`
);
assert.deepEqual(asura.latestChapterFromAnchors(asuraAnchors, "ignored"), {
num: 12,
label: "Chapter 12",
});
});
// ============================================================
// Shared helpers
// ============================================================