If you’ve been looking around for information on unit testing and want to know a bit more, or possibly see an example of how to put it into practice, you’re in the right place.
By the end of this blog post, you should be able to:
- Look over parts of your code where you’d like to add unit tests.
- Understand how to break your code into smaller functions.
- Determine what to test.
- Start creating your tests.
We’ll also cover rudimentary mocking, which is the practice of writing pretend calls to test your code against predictable values.