feat(nikki): track Infinity Nikki
Adds the game and its Game8 events page. One `SOURCES` entry against the existing game8 parser, plus one date shape that page needs: `parseLabelledStartEnd` reads a duration cell holding `Start: <date>` and `End: <date>` split by a `<br>`, which a tag-stripping reader flattens into one run of text. Four of the seven events say `End: Permanent`. That is the source telling us there is no deadline, so they publish with `endsAt: null` and `endPrecision: "unknown"` rather than a plausible date. The labelled cell is also structure end to end, so it never becomes a summary — stripping the leading half would leave "End: Permanent" standing where a description belongs. Verified by re-extracting the page with a throwaway script independent of the parser: 7 rows in, 7 events out, every date matching. Note the source itself is stale — its "Current Events" table still lists January-May 2025 and "Upcoming Events" says there are none. The adapter is right; the page looks abandoned, and Nikki coverage worth relying on needs a second source at a higher priority. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
243c7d70dd
commit
67951e81b4
@@ -27,6 +27,7 @@ const CASES: Array<{ adapter: Adapter; fixture: string }> = [
|
||||
{ adapter: adapter("zzz-game8-events"), fixture: "fixtures/zzz/game8-events-2026-08-14" },
|
||||
{ adapter: adapter("endfield-game8-events"), fixture: "fixtures/endfield/game8-events-2026-08-14" },
|
||||
{ adapter: adapter("endfield-wikigg-events"), fixture: "fixtures/endfield/wikigg-events-2026-08-14" },
|
||||
{ adapter: adapter("nikki-game8-events"), fixture: "fixtures/nikki/game8-events-2026-08-17" },
|
||||
];
|
||||
|
||||
async function runAdapter(adapter: Adapter, fixture: string) {
|
||||
@@ -226,6 +227,37 @@ describe("endfield", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("nikki", () => {
|
||||
const fixture = "fixtures/nikki/game8-events-2026-08-17";
|
||||
|
||||
test("reads a labelled Start/End cell, and takes no end from 'Permanent'", async () => {
|
||||
// The duration cell is "Start: January 24, 2025 End: Permanent" — two
|
||||
// labelled halves separated by a <br>, which a tag-stripping reader sees as
|
||||
// one run of text.
|
||||
const events = await runAdapter(adapter("nikki-game8-events"), fixture);
|
||||
expect(events).toHaveLength(7); // every row of the current-events table
|
||||
|
||||
const fiesta = events.find((e) => e.title === "Fireworks Fiesta");
|
||||
expect(fiesta?.startsAt).toBe("2025-01-24T00:00:00.000Z");
|
||||
// "Permanent" is not a date and does not become one.
|
||||
expect(fiesta?.endsAt).toBeNull();
|
||||
expect(fiesta?.endPrecision).toBe("unknown");
|
||||
|
||||
const bubble = events.find((e) => e.title === "Bubble Season");
|
||||
expect(bubble?.startsAt).toBe("2025-04-28T00:00:00.000Z");
|
||||
expect(bubble?.endsAt).toBe("2025-06-12T00:00:00.000Z");
|
||||
});
|
||||
|
||||
test("never presents the labelled cell's own text as a summary", async () => {
|
||||
// "End: Permanent" is structure, not a blurb. Leaving it in the summary
|
||||
// slot would show a reader a date the parser deliberately refused to use.
|
||||
const events = await runAdapter(adapter("nikki-game8-events"), fixture);
|
||||
for (const e of events) {
|
||||
expect(e.summary).toBeNull();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("wiki.gg parser", () => {
|
||||
test("reads exact per-region timers", async () => {
|
||||
// The first source that states region-scoped ends. Asia and the Americas
|
||||
|
||||
Reference in New Issue
Block a user