(element: Element | null, borderBox: Rect)
| 185 | // we are doing this rather than spying on the prototype. |
| 186 | // Sometimes setRef was being provided with an element that did not have the mocked prototype :| |
| 187 | const setBoundingClientRect = (element: Element | null, borderBox: Rect) => { |
| 188 | invariant(element); |
| 189 | |
| 190 | element.getBoundingClientRect = () => setDOMRect(borderBox); |
| 191 | }; |
| 192 | |
| 193 | it('should publish the dimensions of the target when requested', () => { |
| 194 | const expected: DraggableDimension = getDraggableDimension({ |
no test coverage detected
searching dependent graphs…