import React from "react";
import { render } from "@testing-library/react";
import { Value } from "./index";
describe("Value", () => {
    it("formats the score value correctly", () => {
        const { getByTestId } = render(React.createElement(Value, { scoreValue: 4.567 }));
        expect(getByTestId("score-card-value")).toHaveTextContent("9.2"); // 4.567 rounded to 1 decimal place is 4.6, multiplied by 2 is 9.2
    });
    it("handles non-numeric values gracefully", () => {
        const { getByTestId } = render(
        // @ts-expect-error Testing non-numeric input
        React.createElement(Value, { scoreValue: "not a number" }));
        expect(getByTestId("score-card-value")).toHaveTextContent("0"); // Non-numeric values should be treated as 0
    });
    it("handles zero score value correctly", () => {
        const { getByTestId } = render(React.createElement(Value, { scoreValue: 0 }));
        expect(getByTestId("score-card-value")).toHaveTextContent("0"); // Zero should be displayed as 0
    });
});
//# sourceMappingURL=index.test.js.map