Added mocha unit test functionality