mercredi 27 janvier 2016

How to test method from object using jasmine

I want to write unit test cases to execute then, how can I create spyobj or spyon for the below senario

factoaryservice1 is the main service, which has dependency service object1. Object1 has a method (get) in object2.

var tasks = [];
tasks.push(factoryservice1.object1.object2.get());
tasks.push(factoryservice1.object1.object3.get());
tasks.push(factoryservice1.object4.get());
tasks.push(factoryservice1.object1.object5.get());
$q.all(tasks)
.then(function(results) {

      // Implementation

 });

Aucun commentaire:

Enregistrer un commentaire