Skip to Content
Learning Node.js Development
book

Learning Node.js Development

by Andrew Mead
January 2018
Beginner
658 pages
13h 10m
English
Packt Publishing
Content preview from Learning Node.js Development

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

Advanced Node.js Development

Advanced Node.js Development

Andrew Mead
Node.js: Tools & Skills, 2nd Edition

Node.js: Tools & Skills, 2nd Edition

James Hibbard, Michael Wanyoike, Nilson Jacques, Jay Raj, Manjunath M
Your First Week With Node.js, 2nd Edition

Your First Week With Node.js, 2nd Edition

James Hibbard, Craig Buckler, Mark Brown, Nilson Jacques, James Kolce, Paul Orac, M. David Green, Florian Rappl

Publisher Resources

ISBN: 9781788395540Supplemental Content