(target, rects)
| 80 | * Stub out getClientRects for the specified target. |
| 81 | */ |
| 82 | export function setClientRects(target, rects) { |
| 83 | target.getClientRects = function () { |
| 84 | return rects.map(({x, y, width, height}) => ({ |
| 85 | width, |
| 86 | height, |
| 87 | left: x, |
| 88 | right: x + width, |
| 89 | top: y, |
| 90 | bottom: y + height, |
| 91 | x, |
| 92 | y, |
| 93 | })); |
| 94 | }; |
| 95 | } |
no test coverage detected