Skip to content

TestScheduler: Should support *lack* of subscriptions in expectSubscriptions` #5499

Closed
@benlesh

Description

Currently, there is no way to properly test a lack of subscription, AFAICT. (Maybe I'm wrong? haha)

So let's say I want to test something like this:

testScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
  const source = cold('  ---a---b---c---d---|');
  const expected = '     --------------------';
  const subscriptions = '--------------------';
  const result = source.pipe(subscribeOn(testScheduler, Infinity));
  expectObservable(result).toBe(expected);
  expectSubscriptions(source.subscriptions).toBe(subscriptions);
});

Ran into this while trying to test a bug in subscribeOn.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    featurePRs and issues for featureshelp wantedIssues we wouldn't mind assistance with.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions