Update @testing-library/react
Closed this issue · 0 comments
Updating to @testing-library/react v14 caused hundreds of act() warnings
.
After some investigation it seems the issue was a mismatch between the @testing-library/dom
versions.
@testing-library/cypress
requires v8.x but @testing-library/react
now requires v9.x.
Going to be honest, not entirely sure how npm
dependency resolution works, but we didn't get any warnings for conflicting packages and we ended up with v8.x in our node_modules
. This didn't stop @testing-library/react
from working, but it seems like this mismatch is what was causing the act()
warnings.
For now I've downgraded back to v13.x of @testing-library/react
which has removed all the warnings.
I think the simplest thing to do is wait until @testing-library/cypress
is updated to also use v9.x of @testing-library/dom
.
Useful links: