chore: remove long-deprecated timer globals#7285
Conversation
| if (envGlobal.mockClearTimers) { | ||
| envGlobal.mockClearTimers(); | ||
| if (this._environment.fakeTimers) { | ||
| this._environment.fakeTimers.clearAllTimers(); |
There was a problem hiding this comment.
I'll copy my comment over, but does it make sense to do this? Would one expect resetModules to remove scheduled fake timers?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'd expect people to call jest.clearAllTimers themselves if needed, tbh. Not sure how breaking that is, though
There was a problem hiding this comment.
I can tell you that pretty easily, haha
|
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. |
Summary
Part of #5171, but as it's pretty breaking on its own, it'd be great to land separately
Test plan
Green CI