DEV Community

Discussion on: Writing Developer-Friendly React Unit Tests

Collapse
 
moubi profile image
Miroslav Nikolov

That is true. The editor will also help write tests faster but I still prefer the plain english syntax of UnexpectedJS. In that case all assertion strings are colored the same and that is easy for me to read as the eye doesn't need to jump.

Another thing I prefer is creating custom assertions to make things even more clear and less wordy.

@jackmellis do you use React Testing Library at Claimer?

Collapse
 
jackmellis profile image
Jack

We do, extensively. Having said that, we split our components based on how dumb they are. Something like a button wouldn't have any "tests", in preference of automated visual tests using something like Percy, Chromatic, Backstop, etc. 😁