DEV Community

Discussion on: Help me improve my unit tests

Collapse
 
markschweiger15 profile image
Mark Schweiger

We add comments most of the time. Maybe it's a bit OCD but we like it that way.

We separate unit and integration tests into 2 different libraries, as running integration tests is less frequent than running unit tests.

The naming convention is fine. But we don't write should as the unit does something.
e.g GetValue_WhenGivenNumberIs3_ReturnsFizz()

The sooner you involve the younger/new devs in unit testing it will serve the team in the long run. Go for it :)