2020-08-22 19:32:48 +03:00
|
|
|
import L from 'leaflet';
|
|
|
|
import marker from 'leaflet/dist/images/marker-icon.png';
|
2023-02-18 13:11:01 +03:00
|
|
|
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
2020-08-22 19:32:48 +03:00
|
|
|
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);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|