jeudi 5 mai 2016

How to create a spy in object with parameters function?

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