This code accompanies the following blog post that goes into detail about how to test Express.JS routes using node-vm https://blog.idagio.com/testing-express-js-with-node-vm-63a344075052
In order to see how testing works run the following commands:
npm install
npm test
The actual tests live in test/server-test.js
.