Test Node RESTful API with Mocha and Chai

InstructorWill Button

Share this video with your friends

Send Tweet

In this lesson, we will use Chai's request method to test our Node application's API responses. By the end of this lesson, you will know how to:

  • install the prerequisites to use mocha and chai in your application
  • test for HTTP status response codes
  • test for a string of text on a page
  • test for a json response and validate the properties of the object
  • write tests that not only verify the response of your application, but the behavior as well
Raunaq Sahni
~ 3 years ago

Hey Will,

Thanks for helping me get upto speed with Mocha / Chai. I'm sure you must've got this before, can I know what color scheme you are using on your vscode?