Installing Mocha

First, let's install Mocha as a development dependency:

$ yarn add mocha --dev

This will install an executable, mochaat node_modules/mocha/bin/mocha, which we can execute later to run our tests.

Get Building Enterprise JavaScript Applications 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.