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).

Bonnie Schulkin
Bonnie Schulkin
8 min

Check out more articles and videos

Workshops on related topic