Using RXJS's TestScheduler
, is there a nice way to marble-test an event-like observable that emits undefined
values?
I am using TypeScript, so type circumvention / monkey-patching is not desirable.
testScheduler.schedule(() => valueEmittingWork(), 20);
testScheduler.schedule(() => valueEmittingWork(), 40);
testScheduler.run(rx => {
rx.expectObservable(myObservable).toBe(`20ms ??? 19ms ???`);
// Above uses the new time progression syntax. What do I put instead of ???
});
As a workaround, I piped the source observable with
.mapTo('a')
and then was able to write: