DEV Community

Discussion on: What do you think of React Testing Library?

Collapse
 
barakplasma profile image
Michael Salaverry

I like the focus on testing via the DOM.
I found that my tests for form fields interactions made my React more accessible, since I decided to use Labels and aria-labelledby tags properly.
I also found that using title instead of data-testid led to more understandable buttons for the end user as well.
Overall, great work.
If I had even one suggestion, it would be to make the examples repo more interactive, perhaps with a demo or "playground" page where one can see the library in action.

Collapse
 
kentcdodds profile image
Kent C. Dodds

I recently updated the repo to link to this: testing-library.com/docs/example-c...

Thanks!