fixing mocha tests