I am following the Jest tutorial to test a react component and am running into preprocessing issues with my jsx. I assume the error is due to preprocessing, the error messag
I had a similar problem, and the solution was adding this to jest config file:
"transform": { "^.+\\.js$": "babel-jest", "^.+\\.jsx$": "babel-jest" // This line was missing }
The reason it was needed in our project, is because we overridden the default "transform" value in jest config file.
"transform"