added mocha tests