Fix existing karma tests. Not actually tested anything sensible yet.