Mark sparse MangaDex hosted catalogs as partial

This commit is contained in:
Codex committed 2026-10-13 22:01:57 +02:00
1 parent 47de081721
commit 0fc1a7b52a
2 files changed
+9 -2

No files matched your search

+4 -1
View File
@@ -39,7 +39,9 @@ test('availability distinguishes no English, external-only, and partial hosted c
const chapters = selectChapterReleases([release('regular-fixture', '336')]);
const summary = availabilitySummary({ lastChapter: '686' }, [release('regular-fixture', '336')], chapters);
assert.equal(summary.coverage, 'partial'); assert.equal(summary.selectedChapters, 1);
assert.equal(availabilitySummary({ lastChapter: '336' }, [], chapters).coverage, 'unknown', 'Highest number alone does not prove completeness');
assert.equal(availabilitySummary({ lastChapter: '336' }, [], chapters).coverage, 'partial', 'One late chapter does not cover the earlier 335');
const full = selectChapterReleases(['1', '2', '3'].map((number, index) => release(`full-${index}`, number)));
assert.equal(availabilitySummary({ lastChapter: '3' }, [], full).coverage, 'unknown', 'A plausible count is still not proof of whole-series completeness');
});
test('catalog uses separate external-only feed only when hosted selections are empty', async () => {
@@ -130,6 +132,7 @@ test('inspection waits for confirmation, survives restart, and uses one normal s
test('edition change after confirmation cannot silently download another edition', async () => {
const service = Object.create(ScraperService.prototype);
service.persist = async () => {};
service.state = { sourceLedger: {} };
const item = { title: 'slug', confirmedSourceTitle: 'Pilot edition' };
await assert.rejects(service.recordCatalog(item, { title: 'Main edition', chapters: [] }), /edition title changed/);
});