Writing Unit Tests for Our Application
Learn about unit tests and the feedback we get from them.
We'll cover the following...
Unit tests - expect
When setting up the tests, we have the option of grouping all the expect
calls within a single test function. This can be a good idea if multiple tests require the same setup steps and those steps are slow. In this case, combining them reduces the work that needs to be done and can speed up the tests. On the other hand, if our tests are slow, then they aren’t good unit tests. Unit tests should be fast because they will be run on every commit to the repository. Most of the time, it’s better to put the expect
calls in separate functions. Once ...