Skip to Content
Beginning Node.js
book

Beginning Node.js

by Basarat Ali Syed
December 2014
Beginner content levelBeginner
308 pages
7h 10m
English
Apress
Content preview from Beginning Node.js

CHAPTER 12

image

Testing

I never make stupid mistakes. Only very, very clever ones.

—John Peel

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.

Assert

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Node.js in Action, Second Edition

Node.js in Action, Second Edition

Bradley Meck, Nathan Rajlich, TJ Holowaychuk, Mike Cantelon, Tim Oxley, Alex Young
Node.js for Beginners

Node.js for Beginners

Ulises Gascón
Node.js in Action

Node.js in Action

TJ Holowaychuk, Nathan Rajlich, Mike Cantelon, Marc Harter

Publisher Resources

ISBN: 9781484201879Purchase book