Assertions and Asynchronous Test Cases
In the last video, we set up a Mocha unit test and got it running. The thing is it doesn't actually test anything, yet.
To help us make some tests, we'll now add an assertion library called expect. Let's first install it:
$ npm i -D expect@23
With that installed, let's now require it at the top of the test file:
tests/unit/server/item.test.js
const expect = require("expect");
Click to load comments...