rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

Expose delegate method

Open MillerSvt opened this issue 6 months ago • 0 comments

Description:

We need the ability to delegate and dispose timers independently within beforeEach/afterEach. The createDelegates method is currently private, preventing its use. We must resort to a workaround: executing scheduler.run(() => {}) in the afterEach section. However, this can lead to inconsistencies with cold observables, created inside and outside the flush process, due to varying frameTimeFactor values. To mitigate this, we now reset frameTimeFactor to its default (10) within scheduler.run(() => { TestScheduler.frameTimeFactor = 10; }). Ideally, we would prefer a more elegant and reliable solution.

Related issue (if exists): https://github.com/just-jeb/jest-marbles/issues/573 https://github.com/just-jeb/jest-marbles/issues/394

MillerSvt avatar May 20 '25 02:05 MillerSvt