Could you make this conditional, too? This is only needed for karma + mocha, right?