-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
The module factory of jest.mock()
is not allowed to reference any out-of-scope variables.
#19120
Comments
Downgrading my version of yarn didn't change anything. Not sure why, but you guys really need to take a look at this. |
👍 Full Error log
|
That is related to Node.js version for sure. It started appearing right after upgrading from |
@borisyankov Can confirm, all my tests fail on |
Same case, upgrade from node 9.x to 10.x resulted in error below
|
Having similar issue here after upgrading to node version 10.X |
Same issue with Node v10.1.0. Downgraded to Node v8.11.1 via homebrew and tests are passing again. |
Maybe it's a problem with jest, I tried to report it to jest when I have time. |
For anyone want to use with node 10, update jest in "jest": "23.0.0-charlie.1" |
I have reported to jest in jestjs/jest#6196. If you want to fix this asap, please upvote that issue. |
Same problem while running Jest tests on Node |
@hramos Jest has released a new version, I think we can close this. |
@grabbou Do you think a new release is needed or put this in change log ? |
Basically you need the latest jest ( 22.4.4 released on today ) to support node 10 for react native. |
We do not support Node 10.x yet, but this will get resolved at the time of support (which is to happen soon anyway) |
From I test, jest is the only problem I run into before they release 22.4.4. |
@hramos I'm using node 8.9 with latest react-native (0.56.0-rc.1) and still seeing this error. The simplest workaround is to patch
|
^ @pvdz |
@dlowder-salesforce Can you try latest nodejs 8 and jest ? |
Yeah, fixed in 23.0.0: jestjs/jest#6075 (It's in the changelog 😉) |
My error is about |
I'm using react-native with expo and just did:
node 10.6.0 |
Environment
My Environment is as below.
Steps to Reproduce
Initialise
react-native
application. Preferably usingreact-native-clie
Ensure you have atleast one test.
Run
yarn test
Expected Behavior
The expected behaviour is for the tests to run successfully. To either fail or pass.
Actual Behavior
All test suites fail throwing the error below
The error message continues to say
The text was updated successfully, but these errors were encountered: