I never make stupid mistakes. Only very, very clever ones.
Testing is an integral part of any successful software development life cycle. It ensures that defects are noticed as early as possible. It also prevents feature regressions where things you know to work right now can break because of new code. In this chapter, we will look at various libraries that help test Node.js applications.
Node.js comes with assert as a core module, which you use simply as require('assert'). The main objective of assert is to provide you with simple logic checks to throw errors based on invalid situations. Consider the simple ...