Solving problems with karma test