// Install the ambient DOM augmentations (leaflet-* tag map, custom-event map) // for the whole test program. In the shipped package these come in through the // npm entry (src/index.npm.ts); the tests import element modules directly, so // they need this explicit pull-in to type `addEventListener('leaflet-register', // ...)` and `querySelector('leaflet-map')`. import '../src/core/globals.ts'; // jsdom has no ResizeObserver. leaflet-map only uses it to call // invalidateSize() on resize, which no test here depends on incidentally -- // without a stub, just importing the component throws. class ResizeObserverStub implements ResizeObserver { observe(): void {} unobserve(): void {} disconnect(): void {} } globalThis.ResizeObserver ??= ResizeObserverStub;