Added test for getTagText

This commit is contained in:
Bertie690 2025-08-14 23:28:20 -04:00
parent 57b8b466df
commit 4de3226d99

View File

@ -56,8 +56,19 @@ describe("UI - Arena Flyout", () => {
});
// Helper type to get around unexportedness
type infoType = Parameters<(typeof flyout)["getTagText"]>[0];
type posTagInfo = (typeof flyout)["positionalTags"][number];
describe("getTagText", () => {
it.each<{ info: Pick<infoType, "name" | "duration" | "maxDuration">; text: string }>([
{ info: { name: "Spikes (1)", duration: 0, maxDuration: 0 }, text: "Spikes (1)\n" },
{ info: { name: "Grassy Terrain", duration: 1, maxDuration: 5 }, text: "Grassy Terrain (1/5)\n" },
])("should get the name of an arena effect", ({ info, text }) => {
const got = flyout["getTagText"](info as infoType);
expect(got).toBe(text);
});
});
describe("getPositionalTagDisplayName", () => {
it.each([
{ tag: { tagType: PositionalTagType.WISH }, name: "arenaFlyout:wish" },