You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this library to test a deeply nested async call using callbacks.
varself=this;this.store.find('employee').then(function(employee){//promise #1employee.get('address').then(function(address){//promise #2self.set('suburb',address.get('suburb'));//I don't care how I get here but I want to test this!});});
What I want is to control what address is in the final callback and make sure self.suburb === address.suburb. I can't get this working because once I start mocking I have to mock our each successive return value and therefore never actually hit the code that sets the suburb.
Is this possible using jsmockito? Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
I am trying to use this library to test a deeply nested async call using callbacks.
In this case, this.store is a mock().
What I want is to control what
address
is in the final callback and make sureself.suburb === address.suburb
. I can't get this working because once I start mocking I have to mock our each successive return value and therefore never actually hit the code that sets the suburb.Is this possible using jsmockito? Am I doing something wrong?
The text was updated successfully, but these errors were encountered: