Summary
Testing and documentation are often areas that get deprioritized or overlooked by development teams. However, testing is a requirement for code bases. As a final point, developers should make their tests as small and fast as possible using as close to production code in the Act step as possible.
In this chapter, we covered the different types of testing, which include unit, integration, regression, load testing, system (or E2E tests), and UI testing.
Once we understood the difference between these types of testing, we examined why creating unit tests is important and why test coverage goals shouldn’t be 100%. We then covered common unit testing strategies, such as how to use AAA scaffolding for our unit tests, why writing too much code for our unit tests is considered a code smell, and why mocking libraries aren’t required.
Finally, we learned how to supplement documentation by using comments and folders, how to identify slow integration tests by adding...