Grunt task karma:dev was replaced by jasmine
Small refactoring in tests