import { describe, it, expect } from "vitest"; import { render, screen } from "@testing-library/react"; import { MaterialIcon } from "./MaterialIcon.component"; describe("MaterialIcon", () => { it("renders correctly", () => { const { container } = render(); expect(container).toMatchSnapshot(); }); it("should not be focusable by default", () => { render(); const icon = screen.getByText("home"); expect(icon.tabIndex).toBe(-1); }); it("should be focusable when isFocusable is true", () => { render(); const icon = screen.getByText("home"); expect(icon.tabIndex).toBe(0); }); });