Fix karma unit test