polylines tooltip content
This commit is contained in:
24
__tests__/unit/components/gisPolylines/icons/EndIcon.test.js
Normal file
24
__tests__/unit/components/gisPolylines/icons/EndIcon.test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// __tests__/components/gisPolylines/icons/EndIcon.test.js
|
||||
jest.mock("leaflet", () => {
|
||||
const actualLeaflet = jest.requireActual("leaflet");
|
||||
return {
|
||||
...actualLeaflet,
|
||||
DivIcon: jest.fn().mockImplementation((options) => ({
|
||||
...options,
|
||||
options,
|
||||
_leaflet_id: Math.random(),
|
||||
})),
|
||||
};
|
||||
});
|
||||
|
||||
import L from "leaflet";
|
||||
import EndIcon from "../../../../components/gisPolylines/icons/EndIcon";
|
||||
//console.log("console log EndIcon: ", EndIcon);
|
||||
describe("endIcon", () => {
|
||||
test("should be a custom-end-icon with correct HTML and styles", () => {
|
||||
expect(EndIcon.options.className).toBe("custom-end-icon");
|
||||
expect(EndIcon.options.html).toBe("<div style='background-color: gray; width: 14px; height: 14px; border: solid black 2px;'></div>");
|
||||
expect(EndIcon.options.iconSize).toEqual([14, 14]);
|
||||
expect(EndIcon.options.iconAnchor).toEqual([7, 7]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user