mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-08 04:33:03 +03:00
Finished migrating ll short-url helpers to TS
This commit is contained in:
parent
c0f5d9c12c
commit
4b33d39d44
30 changed files with 483 additions and 499 deletions
test/utils/helpers
19
test/utils/helpers/leaflet.test.ts
Normal file
19
test/utils/helpers/leaflet.test.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import L from 'leaflet';
|
||||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
||||
import marker from 'leaflet/dist/images/marker-icon.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);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue