Chapter 8. Testing with Server-Side JS

Until now, we have been learning about testing the frontend part of a system. We learned many tools that could test the functions needed to support frontend, feature detection, and so on. In this chapter, we will learn about server-side testing for which we will be using Node.js and Mocha.

We will be covering the following topics in this chapter:

  • Setting up the environment
  • The server-side JavaScript testing

Setting up the environment

We have covered the simple unit test on the frontend JavaScript with different frameworks in our previous chapters. When it comes to unit testing the code on the server side, we mostly remain unaware of the order in which the functions will be called, we may either try to run the ...

Get Test-Driven JavaScript Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.