import React from "react";
import { render } from "@testing-library/react";
import { describe, it, expect, vi } from "vitest";
import { ValueIndicator } from "./index";
vi.mock("@phosphor-icons/react", () => ({
    CaretUpIcon: () => React.createElement("svg", { "data-testid": "caret-up-icon" }),
    CaretDownIcon: () => React.createElement("svg", { "data-testid": "caret-down-icon" }),
    EqualsIcon: () => React.createElement("svg", { "data-testid": "equals-icon" }),
}));
describe("ValueIndicator", () => {
    it("renders with higher comparison", () => {
        const { getByTestId } = render(React.createElement(ValueIndicator, { comparison: "higher" }));
        const container = getByTestId("value-indicator");
        expect(container).toHaveAttribute("data-comparison", "higher");
        const icon = container.querySelector("svg");
        expect(icon).toBeInTheDocument();
        expect(icon).toHaveAttribute("data-testid", "caret-up-icon");
    });
    it("renders with lower comparison", () => {
        const { getByTestId } = render(React.createElement(ValueIndicator, { comparison: "lower" }));
        const container = getByTestId("value-indicator");
        expect(container).toHaveAttribute("data-comparison", "lower");
        const icon = container.querySelector("svg");
        expect(icon).toBeInTheDocument();
        expect(icon).toHaveAttribute("data-testid", "caret-down-icon");
    });
    it("renders with equal comparison", () => {
        const { getByTestId } = render(React.createElement(ValueIndicator, { comparison: "equal" }));
        const container = getByTestId("value-indicator");
        expect(container).toHaveAttribute("data-comparison", "equal");
        const icon = container.querySelector("svg");
        expect(icon).toBeInTheDocument();
        expect(icon).toHaveAttribute("data-testid", "equals-icon");
    });
});
//# sourceMappingURL=index.test.js.map