Update to shlink-web-component 0.1.1

This commit is contained in:
Alejandro Celaya
2023-08-14 13:06:11 +02:00
parent 0622288990
commit f7cddf8fc5
5 changed files with 8 additions and 50 deletions

View File

@@ -1,19 +0,0 @@
import L from 'leaflet';
import marker from 'leaflet/dist/images/marker-icon.png';
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
import markerShadow from 'leaflet/dist/images/marker-shadow.png';
import { fixLeafletIcons } from '../../../src/utils/helpers/leaflet';
describe('leaflet', () => {
describe('fixLeafletIcons', () => {
it('updates icons used by leaflet', () => {
fixLeafletIcons();
const { iconRetinaUrl, iconUrl, shadowUrl } = L.Icon.Default.prototype.options;
expect(iconRetinaUrl).toEqual(marker2x);
expect(iconUrl).toEqual(marker);
expect(shadowUrl).toEqual(markerShadow);
});
});
});