Jest fails to transpile import from npm linked module
I have a project with multiple modules (using Lerna ) and I want to use Jest to run tests. However, when I test code that uses a shared module (npm linked module via Lerna) it seems that Babel is not correctly applied and I get the following error: SyntaxError: Unexpected token import The structure of my project is like this: - my-project |- shared |- native |- web web and native require the shared module. When I go into the shared directory and run the local tests in Jest everything works fine. If I run Jest tests in the web directory the above error occurs as soon as I include something from