Skip to content
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

Closed
wants to merge 7 commits into from
Closed

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Jun 13, 2021

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.

@netlify
Copy link

netlify bot commented Jun 13, 2021

✔️ 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

@eps1lon eps1lon marked this pull request as ready for review June 13, 2021 20:40
@timdorr
Copy link
Member

timdorr commented Jun 14, 2021

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.

@eps1lon
Copy link
Contributor Author

eps1lon commented Jun 14, 2021

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

@markerikson
Copy link
Contributor

What's the actual issue this PR is supposed to fix?

@eps1lon
Copy link
Contributor Author

eps1lon commented Sep 5, 2021

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.

@NitinChronext
Copy link

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

TypeError: Cannot destructure property 'config' of 'options' as it is undefined.

  at Object.getCacheKey (node_modules/@jest/create-cache-key-function/build/index.js:62:12)
  at ScriptTransformer._getCacheKey (node_modules/@jest/transform/build/ScriptTransformer.js:280:41)
  at ScriptTransformer._getFileCachePath (node_modules/@jest/transform/build/ScriptTransformer.js:351:27)
  at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:588:32)
  at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:758:40)
  at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:815:19)`

@@ -51,7 +51,10 @@ describe('React Native', () => {
return action.type === 'APPEND' ? prev + action.body : prev
}

afterEach(() => rtl.cleanup())
Copy link
Contributor Author

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.

@eps1lon eps1lon changed the title test: Bump jest to 27.0.4 test: Bump jest to ^27.2.2 Sep 27, 2021
@eps1lon eps1lon changed the title test: Bump jest to ^27.2.2 test: Bump jest to 27.x Sep 27, 2021
@codesandbox-ci
Copy link

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:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration

@markerikson
Copy link
Contributor

Did finally switch to Jest 29 over in the v9.0-integration branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants