mercredi 31 août 2016

how to test function on in controller scope executed by event

function in controller:

$scope.f = function($event){
   $event.preventDefault();
   //logic
   return data;
}

it('should...', function(){
    //fire event and expect data
})

what is right way for fire event?

Aucun commentaire:

Enregistrer un commentaire