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

30
__mocks__/leaflet.js Normal file
View File

@@ -0,0 +1,30 @@
// __mocks__/leaflet.js
const L = {
map: jest.fn(() => ({
setView: jest.fn(),
on: jest.fn(),
remove: jest.fn(),
addLayer: jest.fn(),
removeLayer: jest.fn(),
})),
tileLayer: jest.fn(() => ({
addTo: jest.fn(),
})),
LayerGroup: jest.fn(() => ({
addTo: jest.fn(),
clearLayers: jest.fn(),
addLayer: jest.fn(),
})),
marker: jest.fn(() => ({
addTo: jest.fn(),
bindPopup: jest.fn(),
on: jest.fn(),
})),
DivIcon: jest.fn(() => ({
className: "",
html: "",
iconSize: [0, 0],
})),
};
export default L;