-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
test: Bump jest to 27.x #1733
test: Bump jest to 27.x #1733
Conversation
✔️ Deploy Preview for react-redux-docs ready! 🔨 Explore the source changes: d0a86c0 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-redux-docs/deploys/615182142903c90008a47d2e 😎 Browse the preview: https://deploy-preview-1733--react-redux-docs.netlify.app |
I just merged in the TL/R update, so maybe that will fix the issue here? I'm not seeing where it's coming from, because I only have the line of the error, not the full trace. |
The react-native preset is incompatible with jest 27. facebook/react has the same issue. I'll do some digging to find out what the status of jest 27 support for the react-native jest preset is. Update: Blocked by facebook/fbjs#441 |
What's the actual issue this PR is supposed to fix? |
Using modern timers (including missing mocks) which have better support in the latest testing library versions which you'll probably want to use to test React 18. |
I till see the same issue in React-Native with jest 27.1.1, Is resolution? This is really frustating. `est suite failed to run
|
@@ -51,7 +51,10 @@ describe('React Native', () => { | |||
return action.type === 'APPEND' ? prev + action.body : prev | |||
} | |||
|
|||
afterEach(() => rtl.cleanup()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is automatically handled by the auto-cleanup from @testing-library/react-native
. We just need to make sure we restore the original timers now.
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 d0a86c0:
|
Did finally switch to Jest 29 over in the |
Switches to modern timers (including missing mocks) which have better support in the latest testing library versions which you'll probably want to use to test React 18.