-
Notifications
You must be signed in to change notification settings - Fork 470
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
feat(config): Add unstable_advanceTimersWrapper
#1022
feat(config): Add unstable_advanceTimersWrapper
#1022
Conversation
advanceTimersWrapper
Codecov Report
@@ Coverage Diff @@
## main #1022 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 916 920 +4
Branches 286 286
=========================================
+ Hits 916 920 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
advanceTimersWrapper
unstable_advanceTimersWrapper
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f35d8c1:
|
7c8411e
to
9d12234
Compare
Makes for a more consistent elapsed times in fake timers
9d12234
to
efd21b4
Compare
Going to merge soon-ish to unblock an alpha release of testing-library/react-testing-library#937. It's behind an |
🎉 This PR is included in version 8.5.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Add
unstable_advanceTimersWrapper
config optionWhy:
Required for backwards compatible support of concurrent rendering in React 18.
Example usage for fixing testing-library/react-testing-library#937:
How:
Wrap advancing timers for jest in
getConfig.advanceTimersWrapper()
.Checklist:
[ ]Documentation added to thedocs site
No documentation yet.