0

jest config is package json

"jest": { "preset": "react-native", "setupFiles": [ "<rootDir>/jestSetup.js" ], "collectCoverage": true, "transform": { "^.+\\.(ts|tsx|js|jsx)$": "ts-jest" }, "transformIgnorePatterns": [ "/node_modules/(?!(@react-native|react-native)/).*/" ] },

babel config is babel.config.js

module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: ['react-native-reanimated/plugin'], }; error message

I tried to search for it on google but nothing similar. I managed to get rid of the error with a fix for another error but then the "other" error came and I already had the fix. Do you guys encountered this issue, or do you have any idea how to solve it?

I also tried to create some simple tests and jest is working, but when I use it on the whole app I get this error

Alpar Bartok
  • 31
  • 1
  • 4

1 Answers1

0

I fixed something similar by adding this to jest.config.js

  transformIgnorePatterns: [
     "node_modules/(?!(@react-native|react-native|react-native-modal|react-native-config|react-native-animatable|@balance-inc)/)"
  ]
Bernardo
  • 531
  • 1
  • 13
  • 31