DEV Community

Discussion on: Beginner's Guide to Jest Testing in React

Collapse
 
lexlohr profile image
Alex Lohr

Thank you for this guide. One noteworthy thing: it's best to use the screen.getByRole selector instead of getByText whenever possible. Otherwise, you may let semantic issues (e.g. a button as a link) pass.

Collapse
 
dsasse07 profile image
Daniel Sasse

Thank you Alex, I appreciate the feedback as I continue to build on my skill set!