Fixed up mocha tests