feat(studio): add visual layout previews, automated unit tests and polish organize imports
This commit is contained in:
1 parent
eb3dc4e88c
commit
e47bee16bb
2 files changed
+684
-553
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -289,4 +289,18 @@ describe("groupSuggestedCategories", () => {
|
||||
])[0];
|
||||
expect(group?.name).toBe("Trophies");
|
||||
});
|
||||
|
||||
it("detects special keyword groups like NFTs, Dragons, and Lasers", () => {
|
||||
const groups = groupSuggestedCategories([
|
||||
entry(1, "nft_trophy_gold"),
|
||||
entry(2, "nft_avatar_statue"),
|
||||
entry(3, "dragon_fire_lamp"),
|
||||
entry(4, "laser_gate_cyan"),
|
||||
]);
|
||||
expect(groups.map((g) => g.name)).toContain("NFTs");
|
||||
expect(groups.map((g) => g.name)).toContain("Dragons");
|
||||
expect(groups.map((g) => g.name)).toContain("Lasers");
|
||||
const nftGroup = groups.find((g) => g.name === "NFTs");
|
||||
expect(nftGroup?.items.map((i) => i.id)).toEqual([1, 2]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user