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

import { Countdown } from "../";

const example = (
  <Countdown
    targetDate="2027-01-01T00:00:00.000Z"
    units={["days", "hours", "minutes"]}
  />
);

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

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