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
I love RTL, but I found statements that RTL is suitable for e2e tests misleading and people making wrong assumptions and solutions following it. Check docs/faq, question "Can I write unit tests with this library?" answer is "Definitely yes! You can write unit, integration, and end-to-end tests with this library."
My own experience is that people start testing page level components with default JSDOM browser like environment and end up with unmaintainable tests. JSDOM environment is very limited in terms of understanding what is actually happening in your app and what is missing when you do updates. Can't emphasize enough what pain is to write and maintain complex component test via back-box JSDOM (JSDOM is great for smaller/human brain comprehendible complexity).
Would you agree that more details on this possible problem could be given in the docs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I love RTL, but I found statements that RTL is suitable for e2e tests misleading and people making wrong assumptions and solutions following it. Check docs/faq, question "Can I write unit tests with this library?" answer is "Definitely yes! You can write unit, integration, and end-to-end tests with this library."
My own experience is that people start testing page level components with default JSDOM browser like environment and end up with unmaintainable tests. JSDOM environment is very limited in terms of understanding what is actually happening in your app and what is missing when you do updates. Can't emphasize enough what pain is to write and maintain complex component test via back-box JSDOM (JSDOM is great for smaller/human brain comprehendible complexity).
Would you agree that more details on this possible problem could be given in the docs?
Beta Was this translation helpful? Give feedback.
All reactions