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

import { Progress } from "../";

const example = (
  <>
    <Progress
      label="Zdieľanie dát: zostavajuce predplatené"
      value="4.1 GB / 7.9 GB"
      width={0.8}
    />
  </>
);

it("is valid html", () => {
  const { container } = render(example);
  expect(container).toHTMLValidate({
    rules: { "no-inline-style": "off" },
  });
});

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