-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Restore fake timers after resetting mocks #2467
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
Conversation
Current coverage is 87.53% (diff: 100%)@@ master #2467 diff @@
==========================================
Files 40 40
Lines 1653 1653
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 1447 1447
Misses 206 206
Partials 0 0
|
@thymikee what's the status of this PR? |
cf6917a
to
9b644a8
Compare
It's finished, and should fix the problem with timers along with For this:
we now have |
Generated by 🚫 dangerJS |
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
Fake timers are implemented as mocks. When defined in
package.json
with"timers": "fake"
they set up mocking functions and work properly. However when combined with"resetMocks": true
they're not restored and completely gone.This is just a naive fix to the problem, but we can think of a better solution where we're actually in control of resetting mocks instead of wiping them out. Not sure how to approach it though.
PR includes integration test with these conflicting options.
Fixes #2455.
Test plan
Integration test