// the following workarounds are necessary to test with tiptap editor Range.prototype.getBoundingClientRect = () => ({ bottom: 0, height: 0, left: 0, right: 0, top: 0, width: 0 }); Range.prototype.getClientRects = () => ({ item: () => null, length: 0, [Symbol.iterator]: jest.fn() }); Document.prototype.elementFromPoint = jest.fn();