strapi/packages/admin-test-utils/lib/mocks/IntersectionObserver.js

16 lines
334 B
JavaScript
Raw Normal View History

'use strict';
class IntersectionObserverMock {
constructor() {
this.root = null;
this.rootMargin = '';
this.thresholds = [];
this.disconnect = () => null;
this.observe = () => null;
this.takeRecords = () => [];
this.unobserve = () => null;
}
}
global.IntersectionObserver = IntersectionObserverMock;