WIP: Jest und Cypress Test

This commit is contained in:
ISA
2024-12-10 14:13:16 +01:00
parent 7cb4417c53
commit 213c2e8111
8 changed files with 1575 additions and 3684 deletions

View 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();
});
});