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
jest-expo failed testing createCacheKeyFunction #13886
Comments
This is const expoPreset = require("jest-expo/jest-preset.js");
|
I was able to get around this issue by adding
I also needed to add |
This issue happens if you are using a newer React Native version, e.g. |
Yes, I downgraded to the version 0.63 and it is fixed. For now, I will use @crcass workaround. |
`jest-expo` has a bug where it imports `fbjs-scripts` library but doesn't declare it as a dependency. This hasn't caused any issues so far because React Native has been pulling in `fbjs-scripts`, and `jest-expo` uses it from there. But RN v0.64 stops pulling in `fbjs-scripts`, so things fail [1]. So, until we get a version of `jest-expo` that declares `fbjs-scripts` as a dependency, or (preferably) consumes the code from its new home at @jest/create-cache-key-function [2] (and hopefully declares *that* as a dependency), we should keep `fbjs-scripts` as our own direct dependency. Since this is meant to be a temporary state, and to keep down complexity, just pin to the exact version that RN pulls in in RN v0.63, which is 1.2.0. [1] expo/expo#13886 (comment) [2] See facebook/react-native@fd9787ecc.
`jest-expo` has a bug where it imports `fbjs-scripts` library but doesn't declare it as a dependency. This hasn't caused any issues so far because React Native has been pulling in `fbjs-scripts`, and `jest-expo` uses it from there. But RN v0.64 stops pulling in `fbjs-scripts`, so things fail [1]. So, until we get a version of `jest-expo` that declares `fbjs-scripts` as a dependency, or (preferably) consumes the code from its new home at @jest/create-cache-key-function [2] (and hopefully declares *that* as a dependency), we should keep `fbjs-scripts` as our own direct dependency. Since this is meant to be a temporary state, and to keep down complexity, just pin to the exact version that RN pulls in in RN v0.63, which is 1.2.0. [1] expo/expo#13886 (comment) [2] See facebook/react-native@fd9787ecc.
Forgive me if I'm misunderstanding, but as of SDK 43 beta 4 this is not fixed and 43 includes RN 0.64.2. Will this be fixed in the final release? |
Summary
Hi, I'm having trouble updating to SDK 42 to run unit tests.
I am having this error with jest-expo
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
42
Environment
Expo CLI 4.9.1 environment info:
System:
OS: Windows 10 10.0.19043
Binaries:
Node: 14.17.3 - C:\Users\jocab\AppData\Local\Temp\yarn--1627936221009-0.16358276054367216\node.CMD
Yarn: 1.22.4 - C:\Users\jocab\AppData\Local\Temp\yarn--1627936221009-0.16358276054367216\yarn.CMD
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
Watchman: 20200424.164118.0 - C:\Users\jocab\watchman\windows\bin\watchman.EXE
SDKs:
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3
System Images: android-23 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7351085
npmPackages:
expo: ^42.0.0 => 42.0.0
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.2 => 0.64.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
N/A
The text was updated successfully, but these errors were encountered: