Open eduardo-santos-tribia opened 1 day ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Hi @eduardo-santos-tribia. Sorry to hear that. Some questions might help to understand what happened:
react-native-test-library
)jest
?Hi @cipolleschi , thanks for the reply, I'll provide more info:
Below you can find some libraries that I'm using and their versions:
- jest: ^29.7.0
- @testing-library/jest-native: ^5.4.3
- @testing-library/react-native: ^12.8.1
- @babel/core: ^7.25.2,
- @babel/preset-env: ^7.25.3
- @babel/runtime: ^7.25.0
- babel-jest: ^29.7.0
- babel-loader: ^9.2.1
- babel-plugin-module-resolver: ^5.0.2
- @react-native/babel-preset: 0.76.1
- @react-native/eslint-config: 0.76.1
- @react-native/metro-config: 0.76.1
- @react-native/typescript-config: 0.76.1
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
. I'm unsure if the error is related to the new architecture since they're happening only during tests. The App at least on iOS is building and running fine in debug mode.In the example below I'll show the error related to mocking react-native-keyboard-controller.js, but the error also happens with other third-party library mocks (react-native-gesture-handler for example), I'm just focusing on this one to make it easier to understand.
All errors show the same "ReferenceError: _ii is not defined" message:
Setup files for Test:
__mocks__/react-native-keyboard-controller.js
jest.setup.js
require('@shopify/flash-list/jestSetup')
jest.config.js
metro.config.js
Steps to reproduce
yarn jest --config jest.config.js
React Native Version
0.76.1
Affected Platforms
Other (please specify)
Areas
Other (please specify)
Output of
npx react-native info
Stacktrace or Logs
Reproducer
This happens in my company project.
Screenshots and Videos
No response