Fix mocha tests