Closed
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