Skip to content
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

TestScheduler: Allow expectObservable to schedule observable subscription at non-0 time. #4017

Closed
12wrigja opened this issue Aug 14, 2018 · 3 comments

Comments

@12wrigja
Copy link

Feature Request

In order to provide more control over timings in tests created using TestScheduler, allow expectObservable to start observable subscription at a non-0 time. This would allow for TestScheduler to better schedule sets of expectations which start at different times.

As expectObservable already accepts a subscription diagram, this change could simply involve using the start time in that diagram (if present) as the initial subscription time. I have a change that does this I can propose.

My primary use-case for this sort of behavior is testing that subscribing to an observable at two different times does not cause repeat work in a service that it depends on. Currently, I can't offset the second subscription to the method, and it makes the tests less effective.

@cartant
Copy link
Collaborator

cartant commented Aug 14, 2018

Have a look at #3997

@12wrigja
Copy link
Author

Thanks! Interesting how similar our proposals are. Looking forward to seeing this merged.

@cartant
Copy link
Collaborator

cartant commented Aug 15, 2018

Yeah, I will remember to mention - in the team meeting - that it was feature that you've requested, too.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants