24 lines
555 B
JavaScript
24 lines
555 B
JavaScript
// __mocks__/leaflet.js
|
|
const L = {
|
|
divIcon: jest.fn(() => new L.DivIcon()),
|
|
DivIcon: function () {
|
|
this.options = {
|
|
className: "custom-start-icon",
|
|
html: `
|
|
<svg width="18" height="18" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="10,2 18,18 2,18" fill="black" />
|
|
<polygon points="10,5 16,16 4,16" fill="gray" />
|
|
</svg>
|
|
`,
|
|
iconSize: [18, 18],
|
|
iconAnchor: [9, 10],
|
|
};
|
|
},
|
|
};
|
|
|
|
L.DivIcon.prototype = {
|
|
constructor: L.DivIcon,
|
|
};
|
|
|
|
module.exports = L;
|