I am trying to define some endpoints and do a test using nodejs. In server.js I have:
nodejs
server.js
var express = require(\'express\'); var func1
Assuming you are testing via mocha, you have to run your tests using the mocha command instead of the node executable.
mocha
node
So if you haven't already, make sure you do npm install mocha -g. Then just run mocha in your project's root directory.
npm install mocha -g