Added mocha tests for node.js code