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.
|
advanceTimersWrapperunstable_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_advanceTimersWrapperconfig 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.