Summary
The Node community has embraced testing from the beginning, and many testing frameworks and native tools are made available to developers. In this chapter we've examined why testing is so important to modern software development, as well as something about functional, unit, and integration testing, what they are and how they can be used. With the vm
module we learned how to create special contexts for testing JavaScript programs, along the way picking up some techniques for sandboxing untrusted code.
In addition we've learned how to work with the extensive set of Node testing and error-handling tools, from more expressive console logging to Move onto one line tracing and debugging. Through the assert
and domain
modules we were exposed to error catching and reporting mechanisms, giving us a more robust way to specifically target errors and exceptions, rather than simply catching all in one global handler.
Finally, we learned how to set up a proper build and test system using Grunt and...