refactor and update to karma-jasmine 2