Skip to content
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

chore: remove long-deprecated timer globals #7285

Merged
merged 6 commits into from
Oct 26, 2018

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Oct 26, 2018

Summary

Part of #5171, but as it's pretty breaking on its own, it'd be great to land separately

Test plan

Green CI

if (envGlobal.mockClearTimers) {
envGlobal.mockClearTimers();
if (this._environment.fakeTimers) {
this._environment.fakeTimers.clearAllTimers();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll copy my comment over, but does it make sense to do this? Would one expect resetModules to remove scheduled fake timers?

Copy link
Contributor

@rubennorte rubennorte Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if you consider fake timers and mocks to be in the same "group". In your other PR might make less sense as you're making that distinction clearer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect people to call jest.clearAllTimers themselves if needed, tbh. Not sure how breaking that is, though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can tell you that pretty easily, haha

Copy link
Collaborator

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@rubennorte rubennorte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants