Size and Levels of Testing

Discussing the levels and size of tests is tricky business. Test quotas are not good ideas. In the previous chapters you saw that the number of test lines were roughly three times the number of source lines. That’s not a target number. It’s merely the result or consequence of writing tests first and then writing the minimum code to make each test pass.

Automated testing is a means to an end. The real goal should be to create highly maintainable and valuable software that can be modified rapidly with confidence.

In the TO-DO application, we wrote unit tests on the server side to verify the behavior of database connection functions, the models for the tasks, the routers to handle URL paths, and the validation logic. ...

Get Test-Driving 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.