check:selection-kinds finds the packet call by its shape, not by the zone variable's name

It asserted the variant is forwarded with /printPacket\(zone, \{ ... variant/, so renaming the argument
to titled (the zone carrying its localized title) failed it while the variant was still forwarded. Any
first argument now matches; a planted call without the variant still fails it.
This commit is contained in:
Doxa Maps 2026-09-29 02:05:03 +00:00
parent c8dcb02e97
commit 22658256ba

View file

@ -145,7 +145,10 @@ for (const fn of ['onLegendExport', 'makeSelectionPacket', 'makeSelectionPoster'
'the parsed variant is not passed to printPrayerPacket — the menu would offer two packets and print one')
ok(/async function printPrayerPacket\([^)]*variant/.test(VUE),
'printPrayerPacket does not accept a variant')
ok(/printPacket\(zone,\s*\{[\s\S]{0,120}variant/.test(VUE),
// Any first argument: the call is asserted by SHAPE (the variant inside the options object), not by what
// the zone variable happens to be called. It read `zone` literally, and a rename to `titled` (the zone with
// its localized title) failed this while the variant was still forwarded.
ok(/printPacket\(\w+,\s*\{[\s\S]{0,120}variant/.test(VUE),
'printPrayerPacket does not forward the variant to printPacket — the choice would be parsed, held, and never used')
// ⚠ AND THE STRINGS THE MENU RENDERS MUST EXIST. A missing key prints the raw key, which reads as
// a broken translation rather than a missing string — and the explainer is the only place a