Fix Mocha tests