Exploring assertion libraries

Let's go ahead and start exploring the assertion libraries. First up, let's install the module inside the Terminal by running npm install. The module name itself is called expect and we'll grab the most recent version, @1.20.2. Once again, we'll be using the save-dev flag like we did with Mocha. Because we do indeed want to save this dependency in package.json, but it's a dev dependency, it's not required for the application to run whether it's on Heroku or some other service:

npm install expect@1.20.2 --save-dev
The expect library has been donated to a different organization. The latest version, which is v21.1.0 is not compatible with the backward version we are using here that is 1.20.2. What I like you to ...

Get Learning Node.js Development 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.