O'Reilly logo

Deploying Node.js by Sandro Pasquali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Node's native testing tools

Testing is simply the act of checking whether your assumptions about the state of something are false. In this way, testing software follows the scientific method in that you will express a theory, make a prediction, and run an experiment to see whether the data matches your prediction.

Unlike scientists, software developers can change reality—Einstein's joke about changing the facts if they don't fit the theory actually applies, without irony, to the testing process. In fact, it is required! When your tests (theories) fail, you must change "the world" until the tests do not fail.

In this section, you will learn how to use Node's native debugger for live code testing and how to use the assert module to make predictions, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required