-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Tests failing after upgrading from v0.75.4 to to v0.76.1 #675
Comments
This is my config: https://github.com/kirillzyusko/react-native-keyboard-controller/blob/main/example/jestSetup.js In this branch #656 tests don't fail 🤔 What is Maybe you need to add: jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); // or `react-native/src/private/animated/NativeAnimatedHelper.js`? To your mock setup file? |
Thanks for the reply @kirillzyusko . I've tried to add your setup to mine, but still not working. I also tried to mock the NativeAnimatedHelper as you suggested, didn't work too. I'm not sure what _ii means, looks like it's not related to The error disappears if I change the mock from react-native-keyboard-controller to:
I know this is wrong and I'll not do this, but looks like something from |
Most likely the import of |
I guess the problem is not only the I've removed the Animated and ScrollView from Do you have any idea why by using the ScrollView is also returning this react-native-keyboard-controller/jest/index.js
|
Honestly, don't have any ideas 🤔 This is actually very strange, because theoretically if you have a test where you would test a component that uses |
Yes, you're right, any test with ScrollView would fail. I'll try to create a react-native cli project from scratch to test more and will update this issue when I have more info. |
@kirillzyusko I've figured it out after creating a new react-native v0.76.1 project from scratch. My It's working now and has nothing to do with your library. Sorry for the inconvenience. |
Awesome! Glad to hear you managed to fix it! 🔥 |
Description
Hi, I'm having multiple errors when running my Jest tests after upgrading to
v0.76.1
. Previously all of them were working fine inv0.75.4
.All errors show the same "ReferenceError: _ii is not defined" message:
Setup files for Test:
__mocks__/react-native-keyboard-controller.js
jest.config.js
metro.config.js
Steps to reproduce
yarn jest --config jest.config.js
React Native Version
0.76.1
Stacktrace or Logs
Reproducer
This happens in my company project.
The text was updated successfully, but these errors were encountered: