18 lines
647 B
JavaScript
18 lines
647 B
JavaScript
import { renderHook } from "@testing-library/react-hooks";
|
|
import useTkComponentsMarkersLayer from "./useTkComponentsMarkersLayer";
|
|
|
|
jest.mock("leaflet");
|
|
|
|
describe("useTkComponentsMarkersLayer", () => {
|
|
it("should initialize markers", () => {
|
|
const mapMock = { addLayer: jest.fn(), removeLayer: jest.fn() };
|
|
const omsMock = { addMarker: jest.fn() };
|
|
const gisSystemStatic = [{ IdSystem: 30, Latitude: 50.0, Longitude: 8.0 }];
|
|
const priorityConfig = {};
|
|
|
|
const { result } = renderHook(() => useTkComponentsMarkersLayer(mapMock, omsMock, gisSystemStatic, priorityConfig));
|
|
|
|
expect(result.current).toBeDefined();
|
|
});
|
|
});
|