Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Babel 7? #4748

Closed
julien-f opened this issue Oct 23, 2017 · 10 comments
Closed

Compatibility with Babel 7? #4748

julien-f opened this issue Oct 23, 2017 · 10 comments

Comments

@julien-f
Copy link

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?

@SimenB
Copy link
Member

SimenB commented Oct 24, 2017

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.

@SimenB SimenB closed this as completed Oct 24, 2017
@julien-f
Copy link
Author

Thank you!

@jquense
Copy link
Contributor

jquense commented Jan 29, 2018

this doesn't work? jest@test installs jest-runtime@21.3.0-beta.15 which does not have this fix...

@thymikee
Copy link
Collaborator

@jquense in the meantime we released jest@22

@SimenB
Copy link
Member

SimenB commented Jan 29, 2018

See https://facebook.github.io/jest/docs/en/getting-started.html#using-babel

@jquense
Copy link
Contributor

jquense commented Jan 29, 2018

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

@mistercrunch
Copy link

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.

@SimenB
Copy link
Member

SimenB commented Dec 27, 2018

@mistercrunch that's old! 23.6.0 is latest stable, and installing jest@beta will give you jest@24.0.0-alpha.9

@mistercrunch
Copy link

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.

0x6b added a commit to 0x6b/copy-selection-as-markdown that referenced this issue Jan 9, 2019
- use babel properly with not only running test but also transpile codes (finally)
- update jest@beta to use with babel@7, move webpack-cli as dev dependency

jestjs/jest#4748
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants