Summary: Testing

Review a brief chapter summary.

In this chapter, we discussed the types of testing, TDD, the way unit tests work in FP, and property-based testing. Turning from theory to practice, we showed how to write tests for our monitoring project. Yet again, we emphasized how small, pure functions make testing easier. We noted how easy it is to get to a high level of coverage, how mocks aren’t needed for pure functions, and how keeping impure functions separate and limited reduces the need for (complicated) mocks.

Get hands-on with 1200+ tech skills courses.