March 2018
Intermediate to advanced
592 pages
13h 44m
English
To get started with this one, we will be using it to create a brand-new test case. The text for this one could be something like should not create todo with invalid body data. We can pass in our callback with the done argument, and start making our super-test request.
This time around, there is no need to make a text variable since we're not going to be passing text into it. What we're going to be doing is passing in nothing at all:
it('should not create todo with invalid body data', (done) => {
});
Now, what I'd like you to do is make a request just like we did previously. You're going to make a POST request to the same URL, but instead you're going to send send as an empty object. ...