How to write better assertions in your tests

from blog Just Some Code, | ↗ original
There’s a lot to say about how to write good unit tests. This time, let’s focus on best practices to write better assertions on our tests. Here you have 5 tips to write better assertions on your unit tests. TL;DR Follow the Arrange/Act/Assert (AAA) pattern Separate each A of the AAA pattern with line breaks Don’t put logic in...