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

import { Button } from "../../Button";
import { Buttons } from "../";

const example = (
  <Buttons>
    <Button>Button 1</Button>
    <Button>Button 2</Button>
  </Buttons>
);

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

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