feat(sources): Genshin's Miliastra Pass windows from Fandom
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0a4be4e339
commit
9f8150fda7
@@ -111,17 +111,25 @@ describe("fandomtable canParse across every fixture", () => {
|
||||
expect(files.length).toBeGreaterThan(20);
|
||||
});
|
||||
|
||||
test("true on the Nameless Honor fixture only", async () => {
|
||||
test("true on the two pass-history fixtures only", async () => {
|
||||
const accepted: string[] = [];
|
||||
for (const f of files) {
|
||||
if (fandomTableParser.canParse(await Bun.file(f).text())) accepted.push(f);
|
||||
}
|
||||
expect(accepted).toEqual([FIXTURE]);
|
||||
expect(accepted).toEqual([
|
||||
"fixtures/genshin/fandom-miliastra-pass-2026-10-16.html",
|
||||
FIXTURE,
|
||||
]);
|
||||
});
|
||||
|
||||
test("no other parser claims the Nameless Honor fixture", async () => {
|
||||
const text = await Bun.file(FIXTURE).text();
|
||||
const claimants = PARSERS.filter((p) => p.canParse(text)).map((p) => p.id);
|
||||
expect(claimants).toEqual(["fandomtable"]);
|
||||
test("no other parser claims a pass-history fixture", async () => {
|
||||
for (const f of [
|
||||
FIXTURE,
|
||||
"fixtures/genshin/fandom-miliastra-pass-2026-10-16.html",
|
||||
]) {
|
||||
const text = await Bun.file(f).text();
|
||||
const claimants = PARSERS.filter((p) => p.canParse(text)).map((p) => p.id);
|
||||
expect(claimants).toEqual(["fandomtable"]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -73,6 +73,8 @@ const CASES: Array<{ adapter: Adapter; fixture: string; now?: string }> = [
|
||||
// Pinned at the capture day, not NOW: the page is a history, so which rows
|
||||
// survive depends on the clock, and at capture exactly one does (4.6).
|
||||
{ adapter: adapter("hsr-fandom-nameless-honor"), fixture: "fixtures/hsr/fandom-nameless-honor-2026-10-16", now: "2026-10-16T00:00:00.000Z" },
|
||||
// Genshin's Miliastra Pass history (same reader).
|
||||
{ adapter: adapter("genshin-fandom-miliastra-pass"), fixture: "fixtures/genshin/fandom-miliastra-pass-2026-10-16", now: "2026-10-16T00:00:00.000Z" },
|
||||
];
|
||||
|
||||
async function runAdapter(adapter: Adapter, fixture: string, now: string = NOW) {
|
||||
|
||||
Reference in New Issue
Block a user