mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
Added test for getTagText
This commit is contained in:
parent
57b8b466df
commit
4de3226d99
@ -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" },
|
||||
|
Loading…
Reference in New Issue
Block a user