Skip to content

Expose delegate method #7552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.x
Choose a base branch
from

Conversation

MillerSvt
Copy link

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