added mocha unit test