import React from "react";
import { render } from "@testing-library/react";
import SVGIcon from "../SVGIcon";
describe("SVGIcon", () => {
it("should default to setting aria-hidden", () => {
const { getByTestId } = render();
expect(getByTestId("icon").getAttribute("aria-hidden")).toBe("true");
});
it("should default to setting focusable false to fix IE bugs of custom focus", () => {
const { getByTestId } = render();
expect(getByTestId("icon").getAttribute("focusable")).toBe("false");
});
it("should render correctly", () => {
const { container, rerender } = render(
);
expect(container).toMatchSnapshot();
rerender(
);
expect(container).toMatchSnapshot();
});
});