From 4de3226d998fdd7d7381b40abc72dbfa228a17c9 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Thu, 14 Aug 2025 23:28:20 -0400 Subject: [PATCH] Added test for `getTagText` --- test/ui/flyouts/arena-flyout.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/ui/flyouts/arena-flyout.test.ts b/test/ui/flyouts/arena-flyout.test.ts index 1ca970d82f1..ed05cca5da0 100644 --- a/test/ui/flyouts/arena-flyout.test.ts +++ b/test/ui/flyouts/arena-flyout.test.ts @@ -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; 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" },