Posts tagged with “mocha”

Unit Testing Express.js Routes

Unit testing synchronous objects in Node.js is really simple. You have inputs, and you have outputs, and by exposing an object to all of it's possible inputs, you can assess that the outputs are sane. But what about something like an asynchronous Express.JS route handler? Read on to find out how you can track these sorts of modules.

Authored on January 20, 2014

Hello, I'm Andrew Winder. I work at Message Systems as a Senior Software Engineer, and I blog here about AngularJS, Node.js, and other technical topics. All opinions are my own.