You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
leaflet-components/test/setup.ts

11 lines
372 B
TypeScript

// 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;