Fixing mocha tests