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 running cypress test and I am stubbing(using callFake sinon function) by creating a new object which is shown as observable(when logging), but once returned in the cypress test from the mocked class it is not . Here is the main class :
but none of the objects is observable by logging with isObservable(obj) method and the content is the same I have mocked in the DefaultEmployeeSchedulePersistence class.
Why does when I set up objects with sinon stub before returning them they are observable but once they are fetched in the cypress test the returned result is not observable?
It seems like if I callFake and return objects which are observable , where they will be returned they will lose their observability
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running cypress test and I am stubbing(using callFake sinon function) by creating a new object which is shown as observable(when logging), but once returned in the cypress test from the mocked class it is not . Here is the main class :
I have created a class to stub me the return value of getEmployeeSchedules of the persistance which retrieves the schedules :
but when the cypress test runs it calls the stubbed class like this :
but none of the objects is observable by logging with isObservable(obj) method and the content is the same I have mocked in the DefaultEmployeeSchedulePersistence class.
Why does when I set up objects with sinon stub before returning them they are observable but once they are fetched in the cypress test the returned result is not observable?
It seems like if I callFake and return objects which are observable , where they will be returned they will lose their observability
Beta Was this translation helpful? Give feedback.
All reactions