January 2018
Beginner
658 pages
13h 10m
English
In server.test.js, just following the comments, we need to start things out by calling it. it is the only way to make a new test:
// Make a new test// assert 200// Assert that you exist in users arrayit('should return my user object')
Then we'll specify the callback function. It will get past the done argument because this one is going to be asynchronous:
// Make a new test// assert 200// Assert that you exist in users arrayit('should return my user object', (done) => {});
To kick things off inside the test case, we'll be calling requests just like we did in hello world response, passing in the Express application:
it('should return my user object', (done) => { request(app)});
Now we can set up the actual ...