Learn

In this lesson we covered a set of technologies used for testing a Node server. These included:

  • Chai - a library for extending the built in Node assertion library
  • jsdom - a library for interacting and testing the DOM returned by the server (this functionality is encapsulated in our parseTextFromHTML helper function).
  • async / await - a pattern for making asynchronous code more readable
  • SuperTest - a library for making Node server requests and testing their responses

Instructions

1.

In the pane to the right there is a test that makes use of all the technologies. Run the test using npm test and verify it passes. In the next lesson, we’ll use these concepts to further explore testing a Node server.

When you are ready to move on, check your work.

Folder Icon

Sign up to start coding

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?