Skip to content

Commit

Permalink
Bump dependencies (#3158)
Browse files Browse the repository at this point in the history
* use `act` from `react` instead of `@testing-library/react`

* bump dependencies

* bump `@testing-library/react`

* bump `@react-aria/interactions`

* bump "@tanstack/react-virtual"

* add `ResizeObserver` polyfill, and enable it by default for tests

* mock `getBoundingClientRect`

Otherwise the virtualization tests don't work as expected because they
rely on the client rect which is not supported (or not correctly
measured) in JSDOM.
  • Loading branch information
RobinMalfait authored May 2, 2024
1 parent 1a440e1 commit f0e3e5b
Show file tree
Hide file tree
Showing 13 changed files with 505 additions and 203 deletions.
6 changes: 6 additions & 0 deletions jest/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import ResizeObserverPolyfill from 'resize-observer-polyfill'

if (typeof ResizeObserver === 'undefined') {
global.ResizeObserver = ResizeObserverPolyfill
}

// JSDOM Doesn't implement innerText yet: https://github.com/jsdom/jsdom/issues/1245
// So this is a hacky way of implementing it using `textContent`.
// Real implementation doesn't use textContent because:
Expand Down
Loading

0 comments on commit f0e3e5b

Please sign in to comment.