Testing NodeJS with Mocha and Chai
Last weekend, I worked on a coding challenge that involved writing two NodeJS servers with unit tests. The NodeJS portion of the project was pretty straightforward. One server generates random arithmetic problems and POSTs them to the other server. The second server accepts the POST, parses the equation, solves it, and responds with the answer. The code is available on Github.
It was a fun project to work on. The only part that I had trouble with was the unit tests.