Add unit test

This commit is contained in:
Eric Liu 2025-04-18 10:24:06 -07:00
commit db0fccbfb4
2 changed files with 13 additions and 0 deletions

View file

@ -96,6 +96,17 @@ describe("ComboBox", () => {
expect(screen.getByText("Contact")).toHaveClass("bx--label--disabled");
});
it("should handle hidden label", () => {
render(ComboBox, {
props: {
titleText: "Hidden Label",
hideLabel: true,
},
});
expect(screen.getByText("Hidden Label")).toHaveClass("bx--visually-hidden");
});
it("should handle invalid state", () => {
render(ComboBox, {
props: {