fix up karma/mocha tests