import React from "react";
import { vi } from "vitest";
import { render } from "@testing-library/react";
import { ToggleIcon } from "./index";
vi.mock("@phosphor-icons/react", () => ({
    CaretDownIcon: () => React.createElement("div", { "data-testid": "expand-toggle-icon" }),
}));
describe("ToggleIcon", () => {
    it("should render the icon when isExpandable is true", () => {
        const { getByTestId } = render(React.createElement(ToggleIcon, { isExpandable: true }));
        expect(getByTestId("expand-toggle-icon")).toBeInTheDocument();
    });
    it("should not render the icon when isExpandable is false", () => {
        const { queryByTestId } = render(React.createElement(ToggleIcon, { isExpandable: false }));
        expect(queryByTestId("expand-toggle-icon")).toBeNull();
    });
});
//# sourceMappingURL=index.test.js.map