(element: Element)
| 63 | |
| 64 | /** Returns the number of mock observers currently observing the specified element. */ |
| 65 | export function getObserverCount(element: Element) { |
| 66 | let count = 0; |
| 67 | observers.forEach((observer) => { |
| 68 | if (observer.isObserving(element)) { |
| 69 | count++; |
| 70 | } |
| 71 | }); |
| 72 | return count; |
| 73 | } |
| 74 | |
| 75 | /** Simulates the element being resized (notifying the observers of that element). */ |
| 76 | export function setElementSize({ |
no test coverage detected