Installing npm modules for testing POST /todos route

Now before we can do any of this, we have to install all of those modules we installed in the test section, expect for assertions, mocha for the entire test suite, supertest to test our Express routes, and nodemon. The nodemon module is going to let us create that test-watch script we had, so we can automatically restart the test suite. Now I know you have nodemon installed globally, but since we are using it inside of a package.json script, it's a great idea to install it locally as well.

We're going to run npm i with expect version 22.3.0, the most recent. Next up is going to be mocha. The most recent version is 5.0.1. After that is nodemon version 1.15.0, and last but not least is

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