fix mocha tests