Skip to content

Expose delegate method#7552

Open
MillerSvt wants to merge 1 commit intoReactiveX:7.xfrom
MillerSvt:expose-delegate-method
Open

Expose delegate method#7552
MillerSvt wants to merge 1 commit intoReactiveX:7.xfrom
MillerSvt:expose-delegate-method

Conversation

@MillerSvt
Copy link
Copy Markdown

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): just-jeb/jest-marbles#573 just-jeb/jest-marbles#394

@MillerSvt MillerSvt changed the base branch from master to 7.x May 20, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant