I have the next create Spy
this.view.Region = {
show: jasmine.createSpy(),
empty: jasmine.createSpy()
};
My function 'show' that is testing has a parameter, when test this send me errors: 'Cannot read property 'show' of undefined'
this.Region.show(View);
How to create a spy with parameters in this case.
Aucun commentaire:
Enregistrer un commentaire