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

Testing secured endpoints

We're now ready to test our user API endpoints. The first thing we should do is create a new test file for testing these. So let's go:

$ touch tests/unit/server/user.test.js

Let's then copy all the required modules from the top of the items test file as we'll need most of these in the users test file, too.

We'll make a few alternations, though; let's require the User model rather than the Item one.

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


Click to load comments...