The video for this lesson is currently being updated, please read the transcript instead.

Unit testing an API

Now that we've got a basic understanding about using Mocha for testing, we're going to create some unit tests for our API endpoints.

What is a unit test?

Before we begin, let's discuss an important concept, which is the idea of a "unit" in unit testing.

So, a unit, is a small, testable part of our application. Typically, this will be a function, like it was in the demo test that we wrote.

To view the complete lesson you'll need to login or join this course.


Click to load comments...