You can avoid to explicitly specify the scheduler by running your tests inside TestScheduler.run(cb). TestScheduler.run will replace the AsyncScheduler with TestScheduler.
TestScheduler.run(cb)
TestScheduler.run
AsyncScheduler
TestScheduler
const testScheduler = new TestScheduler((actual, expected) => {}) testScheduler.run(({ cold, hot, expectObservable }) => { const src$ = interval(1000).pipe(take(3)); const expected = '1000ms 0 999ms 1 999ms (2|)'; expectObservable(src$).toBe(expected); });
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can avoid to explicitly specify the scheduler by running your tests inside
TestScheduler.run(cb)
.TestScheduler.run
will replace theAsyncScheduler
withTestScheduler
.