mirror of https://github.com/vector-im/riot-web
21 lines
469 B
JavaScript
21 lines
469 B
JavaScript
const EventEmitter = require("events");
|
|
const { LngLat } = require('maplibre-gl');
|
|
|
|
class MockMap extends EventEmitter {
|
|
addControl = jest.fn();
|
|
removeControl = jest.fn();
|
|
}
|
|
class MockGeolocateControl extends EventEmitter {
|
|
|
|
}
|
|
class MockMarker extends EventEmitter {
|
|
setLngLat = jest.fn().mockReturnValue(this);
|
|
addTo = jest.fn();
|
|
}
|
|
module.exports = {
|
|
Map: MockMap,
|
|
GeolocateControl: MockGeolocateControl,
|
|
Marker: MockMarker,
|
|
LngLat,
|
|
};
|