I am trying to setup Jest with my webpack project. When I run my tests, Jest complains it cannot read es6 code. Babel seems to not transform my test files.
I have tried
I have some useful information that can be used as a reference for those who see this problem later.
By default, transformIgnorePatterns in jest config was ["/node_modules/", "\.pnp\.[^\/]+$"]
If some guys issue was caused by some code in node_modules and do not overwrite this value, babel-jest still not working.
Maybe the correct value like this "/node_modules/(?!(your-third-part-es-module-code|others-es-lib))"