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

fix(subscribeOn): allow Infinity as valid delay #5500

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Jun 16, 2020

  • Removes use of isNumeric that excludes Infinity as a valid number
  • Moves SubscribeOnObservable to the only location it is used.
  • Removes redundant tests of internals

... Ultimately, I'll be visiting everything that uses isNumeric as it strikes me as strange and unnecessary.

Removes use of `isNumeric` that excludes `Infinity` as a valid number
- Moves SubscribeOnObservable to the only location it is used.
- Removes redundant tests of internals
@benlesh benlesh requested a review from cartant June 16, 2020 00:06
Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but see comment regarding testing for no subscription.

// const sub = ' ';

expectObservable(e1.pipe(subscribeOn(rxTestScheduler, Infinity))).toBe(expected);
// expectSubscriptions(e1.subscriptions).toBe(sub);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought that an empty array could be used:

expectSubscriptions(e1.subscriptions).toBe([]);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. That makes sense. It seems like .toBe(' ') or .toBe('-------') should still work, though. I'll leave issue #5499 open

@benlesh benlesh merged commit cd7d649 into ReactiveX:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants