import React from "react";
import { shallow } from "enzyme";
import ClickMarkerMap from "../components/screens/GamePanel/GuessPane/ClickMarkerMap";

jest.mock("../hooks/useMapBounds");
jest.mock("../hooks/useMap");
jest.mock("../hooks/useClickMarker");
jest.mock("../hooks/useGameInfo");

import { useGameConfig } from "../hooks/useGameInfo";
import useMapBounds from "../hooks/useMapBounds";
import useMap from "../hooks/useMap";

describe("ClickMarkerMap", () => {
  it("renders", () => {
    useMap.mockReturnValue("map");
    useGameConfig.mockReturnValue({ countryLock: "lock" });
    const rendered = shallow(<ClickMarkerMap />);
    expect(rendered).toMatchSnapshot();
    expect(useMapBounds).toHaveBeenCalledWith("map", "lock");
  });
});
