Answers for "Jest failed after upgrade to react-native 0.64"

0

Jest failed after upgrade to react-native 0.64

transformIgnorePatterns: [
-  'node_modules/(?!(jest-)?react-native|@react-native-community|@react-navigation)',
+  'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation)',
]

this is happen  in the the lastest jest lib 

in your package.json the configuration
like givent above 

remove the line -  in unser jest config 

add  the line +  in this array object 

this is my configuraion


"jest": {
    "preset": "react-native",
    "setupFilesAfterEnv": [
      "@testing-library/jest-native/extend-expect"
    ],
    "transformIgnorePatterns": [
     "node_modules/(?!(jest-)?@?react-native|@reactw-native-community|@react-navigation)"
    ],
    "setupFiles": [
      "./node_modules/react-native-gesture-handler/jestSetup.js"
    ],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
},
Posted by: Guest on August-04-2021

Code answers related to "Jest failed after upgrade to react-native 0.64"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language