Summary

This has definitely been a crash course on testing, but the groundwork has been laid and I hope that you have a solid understanding of the tool chain that you can use to write your own tests. Trust this powerhouse suite of tools and you'll be writing bulletproof code in no time!

The ultimate goal with writing tests is to have 100 percent complete code coverage and have unit tests exist for every line of code you write. From here, the true test is to switch to TDD, which dictates that you write tests before any code exists at all. Obviously, tests against nonexistent code will fail, so then you'll need to write the least amount of code to get it to pass, and repeat!

In the next chapter, we'll take a look at a number of cloud-based hosting ...

Get Web Development with MongoDB and NodeJS - Second Edition 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.