In the last section we learned how to use mocha in a Node.js environment, but this framework can also be used to execute client-side tests in a browser environment. To do this we need to create an HTML page and add the CSS and js of mocha to it:
To add the mocha.css you add the following line in your HTML:
<link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
On the server side we could use the default assert module from Node.js, but as this module is not available in the browser context, we will have to add a library to handle the assertions of ...