Description
There are a ton of issues about this, and after two hours of reading through them all, I still wasn't able to get a sense of the state of things.
- It seems that some Jest config options are now available: Make coverage and snapshot Jest options overridable in package.json #1830
- Please make
transformIgnorePatterns
also available.
We have a case where we have local libraries that are brought into node_modules
, but then Jest stumbles whenever we import them, because it is not pre-processing the React components in node_modules
. Transpiling our components before export is not an option because the constant transpiling every time one makes a change is a serious drag on development.
Some discussion threw out symlinks
as a solution or workaround, but another developer on our team sunk many hours into that before finally getting stuck again.
There has to be a simple way to make LibraryA/MyReactComponent go into MyApp/node_modules, such that MyApp/src/MyComponent can import MyReactComponent during tests without any problems.
It would seem to be a common use case.