import React from "react";
import { vi } from "vitest";
import { render } from "@testing-library/react";
import { Container } from "./index";
describe("Container", () => {
    it("renders a non-clickable container when onClick is not provided", () => {
        const { getByTestId } = render(React.createElement(Container, { scoreKey: "transit_friendly" }, "Test Container"));
        const container = getByTestId("score-card-container-transit_friendly");
        expect(container).toHaveTextContent("Test Container");
        expect(container.tagName).toBe("DIV");
    });
    it("renders a clickable container when onClick is provided", () => {
        const onClickMock = vi.fn();
        const { getByTestId } = render(React.createElement(Container, { scoreKey: "transit_friendly", onClick: onClickMock }, "Test Container"));
        const container = getByTestId("score-card-container-transit_friendly");
        expect(container).toHaveTextContent("Test Container");
        expect(container.tagName).toBe("BUTTON");
        container.click();
        expect(onClickMock).toHaveBeenCalledWith("transit_friendly");
    });
});
//# sourceMappingURL=index.test.js.map