Reputation: 4595
What is the difference between:
expectObservable(e1.merge(e2)).toBe(expected);
and
expect(e1.merge(e2)).toBeObservable(expected);
syntax?
Is it matter of a testing library or just a flavor?
Upvotes: 3
Views: 3698
Reputation: 2888
Based on my usage: toBeObservable is from third party library, jasmine-marbles
expectObservable is from build in rxjs module: TestScheduler.
Upvotes: 2
Reputation: 2336
Seems like the official repos use a .toBeObservable matcher.
https://github.com/synapse-wireless-labs/jasmine-marbles/blob/master/spec/integration.spec.ts
https://github.com/cartant/rxjs-marbles
Not sure why the RxJS documentation uses expectObservable()
Upvotes: 1