Fix karma.js to ignore spaces at the end