Testing React: A Convert’s Journey from Enzyme to Testing Library


Testing Library's advantages over Enzyme for testing React:

- Opinionated framework enforces best testing practices (test behavior, not integration) 

- Opinions on how to find elements ( role) encourages accessibility 

- jest-dom assertions lead to simple, readable tests 

- ESLint plugins help encourage best practices in real time 

- test output helps locate elusive elements

There will be a few code examples, but this is largely a discussion (rather than a how-to).

8 min
15 Jun, 2021

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Workshops on related topic