Fix phantom mocha tests