Presenting these examples took work. I hope they'll make your life easier!
There's a lot of wisdom that goes into writing clean tests. With every project I learn something new. I wanted to document my latest testing style and use it as a go-to resource for future projects.
The test examples are up to date and run in CircleCI. This searchable library is generated from README and test files available on GitHub.
The testing examples are opinionated. They aim to mimic user behavior and avoid testing abstract components. But you're free to disagree with my testing philosophy. The examples also feature modern libraries and agnostic testing techniques.
The component setup. Performing actions and assertions is already well documented by the tools that handle event simulation and/or expectations. The examples here focus on how to wire up various component types for testing.
Let's harness our collective knowledge to create a great resource for testing React components!
Best,
Ovidiu