I currently have been trying to mock/stub/spy on a service so that I can set the return value to something different for a number of tests.
eg.
mockService.getCountOfItems.and.returnValue.(of(1));
// some expectations
mockService.getCountOfItems.and.returnValue.(of(0));
// some expectations
However this for some reason seems impossible. Am I missing something really obvious here?
Thanks
Aucun commentaire:
Enregistrer un commentaire