


export {ResizeObserverMock}


class ResizeObserverMock {
    constructor(callback) {
        this.callback = callback;
        this.elements = [];
    }

    observe(element) {
        this.elements.push(element);
    }

    unobserve(element) {
        this.elements = this.elements.filter((el) => el !== element);
    }

    disconnect() {
        this.elements = [];
    }

    triggerResize(entries) {
        this.callback(entries, this);
    }
}

