mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
17 lines
353 B
JavaScript
17 lines
353 B
JavaScript
|
// 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();
|