fkhadra / fkhadra/react-on-screen
Setting isVisible to true with Jest, or else how to set ref?
Open
- Dominant language
- JavaScript
- Stars
- 402
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to set isVisible to true using Jest?
I want to be able to test whether my function is being called when the element is visible.
Setting the `window.innerWidth` and `window.innerWidth` doesn't work, and `isVisible` is still false.
If it's not possible to set `isVisible` to true, how can I achieve my testing objectives?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.