-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test improvements #20
Comments
Thanks a lot @voliva for looking into the tests and for coming up with ideas on how to improve them. The truth is that I'm not very happy with the tests that we got ATM. I think that the tests that we currently have can be decent for detecting when a refactor breaks something, but are horrible for documenting the behavior of the API...
Totally, let's add those tests ASAP.
As we've discussed before, on Concurrent Mode observing external-inputs on an
I agree. ATM that test is a crappy way to test all the possible usages of the
Agreed!
Good point
What the heck!? Maybe it's because I'm tired, but this really looks wrong to me and I don't quite understand why it's doing that... No, no, no, I think that this should be fixed... The
Yep, the error handling ones should be improved. I agree.
The problem is that AFAIK it's not possible to test them using marble-tests because the operators all emit this special value and every time I try to make marble-tests then the tests break because they don't recognize that value... But yeah, we should. Thanks for the review @voliva ! Let's do this! |
Most of the work is already done, but there's still margin for improvement on the tests. I focused on those methods exposed as part of the API.
connectObservable
it works with suspense
can be broken down. I haven't taken a deep look and I'm a bit out of the loop from suspense, but it will be interesting to see if we can break that test down.connectFactoryObservable
it returns the latest emitted value
it only checks for the initial value. Needs to add in some updates on the source stream.it shares the subscription among all of the subscribers of the same key
. It is superseeded by another test, but this will document a bit better how the key works.observable > if the source observable completes it keeps emitting the latest value until there are no more subscriptions
has anexpect
I found confusing:connectObservable
(as it applies as well)createInput
I found the test cover everything I could think of 👍
rxjs operators
suspended
andswitchMapSuspended
The text was updated successfully, but these errors were encountered: