Flag to prevent Jest from using babel.
See original GitHub issueI have a post on stack overflow about having jest
ignore the babel config.
I just also upgraded to babel-7 and I am getting issues. I saw this doc about using babel-jest.
Again as I state below, my code runs in node 9 I don’t need babel to run my tests, why is jest
forcing me to use it?
From StackOverflow:
I am getting this error:
Couldn’t find preset “env” relative to directory
I have jest
in a package with babel
, the babel dependencies are not installed, which is why I am getting this error, but the file I am testing is the source, and with the version of node that I’m running I don’t need to compile, I only have babel in the project to ship the code I’m building as a postinstall
script on lesser-versions of node then authored.
How can I shut off jest
from forcing babel
dependencies from being installed?
Now I’m getting
TypeError: Cannot read property 'loose' of undefined (While processing preset: "/Users/thomas/Project/node_modules/@babel/preset-env/lib/index.js")
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:8
Top GitHub Comments
Could I just use this:
Jest will use babel anyways - it’s how we do coverage.
There are many issues and SO posts containing information on how to turn of the normal transform - please use search.