loktar00 / react-lazy-load

React component that renders children elements when they enter the viewport.
MIT License
978 stars 166 forks source link

Testing with Jest #171

Closed stevenpr72 closed 5 months ago

stevenpr72 commented 5 months ago

Has anyone ever tested a component with Jest that was using this library? I'm having issues with some old unit tests failing due to IntersectionObserver not being defined. I'm having trouble mocking IntersectionObserver and was wondering if anyone else has run into this.

stevenpr72 commented 5 months ago

Closing duplicate