import { render } from "@testing-library/react";
import { axe } from "vitest-axe";

import { Avatar } from "../";

const example = (
  <Avatar
    className="surface-secondary"
    src="/avatar.png"
    alt="Person avatar"
    iconName="quote"
  />
);

it("is valid html", () => {
  const { container } = render(example);
  expect(container).toHTMLValidate();
});

it("is accessible", async () => {
  const { container } = render(example);
  expect(await axe(container)).toHaveNoViolations();
});
