January 2018
Beginner
658 pages
13h 10m
English
Now, we'll learn an easy, no-nonsense way to test our Express applications. That means we can verify that when we make an HTTP GET request to the / URL, we get the Hello world! response back.
Now traditionally, testing HTTP apps has been one of the more difficult things to test. We would have to fire up a server, like we did in the previous section. Then we would need some code to actually make the request to the appropriate URL. And then we have to dig through the response, getting what we want, and making assertions about it, whether it's headers, the status code, the body, or anything else. It is a real burden. That is not the goal for this section. Our goal here is to make testing easy and approachable, ...
Read now
Unlock full access