import React from "react";
import { render } from "@testing-library/react";
import { describe, it, expect, vi } from "vitest";
import { Header } from ".";
describe("Header", () => {
    it("renders the title and close icon", () => {
        const { getByText, getByTestId } = render(React.createElement(Header, { title: "Test Title" }));
        expect(getByText("Test Title")).toBeInTheDocument();
        expect(getByTestId("poi-popup-content-header-close-button")).toBeInTheDocument();
    });
    it("calls onClose when closed", () => {
        const onCloseMock = vi.fn();
        const { getByTestId } = render(React.createElement(Header, { title: "Test Title", onClose: onCloseMock }));
        const closeButton = getByTestId("poi-popup-content-header-close-button");
        closeButton.click();
        expect(onCloseMock).toHaveBeenCalled();
    });
});
//# sourceMappingURL=index.test.js.map