import React from "react";
import { render } from "@testing-library/react";
import "@testing-library/jest-dom";
import { CircularGaugeProps } from "../CircularGaugeProps";
import CircularGauge from "../CircularGauge";

describe("CircularGauge Component", () => {
  const props: CircularGaugeProps = {
    children: <div>Test Child</div>, 
    className: "test-class", 
    color: "#ff0000", 
    colors: [{ from: 0, to: 50, color: "#00ff00" }], 
    dir: "ltr", 
    opacity: 0.5, 
    renderAs: "svg", 
    scale: { startAngle: -90, endAngle: 90, min: 0, max: 100 }, 
    style: { width: "200px", height: "200px" }, 
    transitions: true, 
    value: 70 
  };

  it("renders all props correctly", () => {
    render(<CircularGauge {...props} />);
  });

  it("matches the snapshot", () => {
    const { asFragment } = render(<CircularGauge {...props} />);
    expect(asFragment()).toMatchSnapshot();
  });
});
