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

Seeding test database with users

In a moment we're going to be writing tests for our new user methods. Before we do, though, we're going to need to seed our test database with users so we have data to work with for our test.

We're going to make up some fake user data for these seed users. Rather than manually creating it, let's use a library called faker which can generate it for us.

Let's install it:

$ npm i -D faker

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


Click to load comments...