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

import { Divider } from "../";

const example = (
  <>
    <Divider />
    <Divider content={<span>Hello node</span>} />
    <Divider content="Hello string" />
    <Divider icon="add" />
  </>
);

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

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