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
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
I am trying to use lettable operators in my project. The productive code works without problems but I am struggling with the tests. Inside my tests I want to use Jasmine Spy to be in control on what my Observable returns. With the old syntax I was able to write the following:
spyOn(Observable.prototype, 'switchMap').and.returnValue(Observable.of(myValue))
or spyOn(Observable, 'of').and.returnValue(Observable.of(myValue))
I thought that the same should look like the snippet below with the new syntax spyOn(ArrayObservable, 'of').and.returnValue(of('Superman'))
Is this possible with lettable operators or is it generally a bad idea to test observable chains with the help of spies?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there
I am trying to use lettable operators in my project. The productive code works without problems but I am struggling with the tests. Inside my tests I want to use Jasmine Spy to be in control on what my Observable returns. With the old syntax I was able to write the following:
spyOn(Observable.prototype, 'switchMap').and.returnValue(Observable.of(myValue))
or
spyOn(Observable, 'of').and.returnValue(Observable.of(myValue))
I thought that the same should look like the snippet below with the new syntax
spyOn(ArrayObservable, 'of').and.returnValue(of('Superman'))
Is this possible with lettable operators or is it generally a bad idea to test observable chains with the help of spies?
The text was updated successfully, but these errors were encountered: