I\'m implementing tests into an existing project that currently has no tests. My tests are failing to compile node_modules/
imports.
/Users/me/m
For create-react-app
users who are looking for a fix, here's what worked for me:
// package.json
...
"jest": {
"transformIgnorePatterns": [
"/node_modules/(?!lodash-es)"
]
},
...
Overriding options in jest.config.js
file didn't work for me. Keep in mind that not every option can be overridden, here's a list of supported options: https://create-react-app.dev/docs/running-tests#configuration