(resetTimers: boolean = true)
| 216 | } |
| 217 | |
| 218 | function prep(resetTimers: boolean = true) { |
| 219 | const scroller = document.getElementsByClassName("dvn-scroller").item(0); |
| 220 | if (scroller !== null) { |
| 221 | vi.spyOn(scroller, "clientWidth", "get").mockImplementation(() => 1000); |
| 222 | vi.spyOn(scroller, "clientHeight", "get").mockImplementation(() => 1000); |
| 223 | vi.spyOn(scroller, "offsetWidth" as any, "get").mockImplementation(() => 1000); |
| 224 | vi.spyOn(scroller, "offsetHeight" as any, "get").mockImplementation(() => 1000); |
| 225 | } |
| 226 | |
| 227 | act(() => { |
| 228 | vi.runAllTimers(); |
| 229 | }); |
| 230 | if (resetTimers) { |
| 231 | vi.useRealTimers(); |
| 232 | } else { |
| 233 | act(() => { |
| 234 | vi.runAllTimers(); |
| 235 | }); |
| 236 | } |
| 237 | |
| 238 | return scroller; |
| 239 | } |
| 240 | |
| 241 | const Context: React.FC = p => { |
| 242 | return ( |
no outgoing calls
no test coverage detected
searching dependent graphs…