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
Click to load comments...