2 What to test and when?
This chapter covers
- The different types of tests and when to use them
- Writing your first automated tests
- How to balance coupling, maintenance, and cost
In the previous chapter, to facilitate explaining what tests are and their benefits, I put all the different types of tests in a single, big conceptual box. I showed tests that dealt with databases, tests that directly called one function, and tests that called multiple functions. In this chapter, I’ll take tests out of that box and put them into separate shelves, each one containing tests of a different kind.
It’s essential to understand how tests fit into different categories because different types of tests serve different purposes. When building a car, for example, ...
Get Testing JavaScript Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.