Jest does not work with Babel 7 (at least with the env preset).
https://github.com/julien-f/jest-babel7
Is there anything I can do to work-around this?
Please use the issue template.
This issue happens because we use babel-core@6 within babel-runtime. Fixed in #4557. So if you install jest@test instead of jest@latest it works.
Thank you!
this doesn't work? jest@test installs [email protected] which does not have this fix...
@jquense in the meantime we released jest@22
yeah sorry, i was poking through the wrong source and had an old dep lodged in my node_modules without realizing it. Sorry for the noise
Related note: on top of installing jest@test (which currently translates to 21.3.0-beta.15), you may also want to do the same with babel-jest ((which also translates to 21.3.0-beta.15) to keep those in sync. In my case that fixed and issue around using --coverage which would throw a No file coverage available for {...} error.
@mistercrunch that's old! 23.6.0 is latest stable, and installing jest@beta will give you [email protected]
I'm not sure in which specific hole of dependency hell I got caught into, but somehow managed to fall back on my feet while using the latest jest.
Most helpful comment
Please use the issue template.
This issue happens because we use babel-core@6 within
babel-runtime. Fixed in #4557. So if you installjest@testinstead ofjest@latestit works.