WIP: Jest und Cypress Test
This commit is contained in:
17
hooks/layers/useTkComponentsMarkersLayer.test.js
Normal file
17
hooks/layers/useTkComponentsMarkersLayer.test.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user