You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -238,6 +238,10 @@ You can read more about this on these links:
238
238
239
239
## Testing
240
240
241
+
> [!TIP]
242
+
> Consider using [Vitest Browser Mode](https://vitest.dev/guide/browser/) instead of `jsdom` or `happy-dom`.
243
+
> This option allows you to utilize the real browser implementation and triggers correctly when scrolling or adding elements to the viewport. You can skip the `react-intersection-observer/test-utils`, or use it as needed.
244
+
241
245
In order to write meaningful tests, the `IntersectionObserver` needs to be
242
246
mocked. You can use the included `react-intersection-observer/test-utils` to
243
247
help with this. It mocks the `IntersectionObserver`, and includes a few methods
0 commit comments