-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
BabylonParser (jest-editor-support) fails with JSX #3070
Comments
etiennedi
added a commit
to etiennedi/jest
that referenced
this issue
Mar 5, 2017
Yeah this sounds good. Would you mind sending a PR for this? :) |
Great. Completed the CLA and sent the PR. :) |
skovhus
pushed a commit
to skovhus/jest
that referenced
this issue
Apr 29, 2017
) * change babylon plugins to all, fixes jestjs#3070 * increase minimum required babylon version for new features to work
tushardhole
pushed a commit
to tushardhole/jest
that referenced
this issue
Aug 21, 2017
) * change babylon plugins to all, fixes jestjs#3070 * increase minimum required babylon version for new features to work
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
File: jest/packages/jest-editor-support/src/parsers/BabylonParser.js
tl;dr: We're manually including one babylon plugin, but I think we should include all plugins.
Long version:
I've been using orta's great vscode-jest extension and noted that it doesn't work correctly on spec files containing JSX. So have others. I could trace the issue back to the
parse
function injest-editor-support
.Babylon will not be able to parse JSX with the default configuration. I noticed we are manually adding the flow plugin, but not the JSX plugin. Since Babylon 6.14.1 we could simply include all available plugins.
So instead of:
We could simply do:
I've tested locally and this fixes my JSX issue.
Update: See the commit I added to the fork. The new test scenario I added wouldn't pass before. It does with the change. Hope you agree, then I'll send the PR.
The text was updated successfully, but these errors were encountered: