-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate useWindowSize
tests to @testing-library/react
#1377
base: master
Are you sure you want to change the base?
Conversation
@JoeDuncko @ArttuOll requesting some help with this one. |
@testing-library/react
@testing-library/react
useWindowSize
tests to @testing-library/react
|
||
triggerResize('width', 200); | ||
triggerResize('height', 200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xobotyi Why did we changed it to hieght
from width
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, to be fair =) it is not intended
There is still an issue with harness - have to rewrite it
@xobotyi Wanted to contribute in this migration.
|
Main issue is that i dont know how to properly migrate to react 18. ideally we have to migrate first to So it seems that ill have to swrite harnesses for react 17, then migrate all tests to |
As
@testing-library/react-hooks
library is abandoned and forces users to switch to@testing-library/react
simple switch of react versions implies adapting most of tests.The library change is not a drop-in threfore requires manual rewriting all tests accroding to [migration guide]
As
@testing-library/react
do not offer a solution for SSR hooks testing - i made an ssr harness which i'm planning to extract to separte package lately when all tests moved and harness will prove to be viable.