UNPKG

@uva-glass/component-library

Version:

React components UvA

23 lines (22 loc) 1.12 kB
import { jsx as e } from "react/jsx-runtime"; import "../../index-dmBn99rF.js"; import { r as t, s as l } from "../../react.esm-DI5ilWeT.js"; import { Label as r } from "./Label.js"; describe("Label", () => { it("should render", () => { t(/* @__PURE__ */ e(r, { htmlFor: "testComponent", children: "Test label" })), expect(l.getByText("Test label")).toBeInTheDocument(); }), it("should render with required", () => { t( /* @__PURE__ */ e(r, { htmlFor: "testComponent", required: !0, children: "Test label" }) ), expect(l.getByText("Test label")).toHaveClass("label--required"); }), it("should render with noFontWeight", () => { t( /* @__PURE__ */ e(r, { htmlFor: "testComponent", noFontWeight: !0, children: "Test label" }) ), expect(l.getByText("Test label")).toHaveClass("label--unset-font-weight"); }), it("should render with alignRight", () => { t( /* @__PURE__ */ e(r, { htmlFor: "testComponent", alignRight: !0, children: "Test label" }) ), expect(l.getByText("Test label")).toHaveClass("label--align-right"); }); }); //# sourceMappingURL=Label.test.js.map