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

Fix SyntaxError for *.mdx files in test output (#754) #758

Merged
merged 2 commits into from
Oct 20, 2021
Merged

Fix SyntaxError for *.mdx files in test output (#754) #758

merged 2 commits into from
Oct 20, 2021

Conversation

toptalo
Copy link
Contributor

@toptalo toptalo commented Oct 18, 2021

Fixes #754

PR Checklist

  • My branch is up-to-date with the Upstream master branch.
  • The unit tests pass locally with my changes (if applicable).
  • I have added tests that prove my fix is effective or that my feature works (if applicable).
  • I have added necessary documentation (if appropriate).

Short description of what this resolves:

I have add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of Babel config as it have been recommended in tests output

Changes proposed in this Pull Request:

  • add .babelrc config file

@vercel
Copy link

vercel bot commented Oct 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dip-trasformazione-digitale/design-react-kit/AQfpGWSrSx3WxEDDc2Fx13FnBtx8
✅ Preview: https://design-react-kit-git-fork-to-55cc7d-dip-trasformazione-digitale.vercel.app

@dej611
Copy link
Member

dej611 commented Oct 19, 2021

I can see the fix works, but I would prefer to have a jest-only configuration to avoid any confusion, rather than a generic .babelrc file.

You can point Jest to a specific js file for this type of things so that it will become clear that is not a build configuration thing. Yu can use as reference the react-router config with its jest-transformer.js file and how they pointed to that from the jest main config file.

@toptalo
Copy link
Contributor Author

toptalo commented Oct 19, 2021

I'm not sure, maybe it would be better to move jest-transformer.js to scripts/jest-transformer.js?

@dej611
Copy link
Member

dej611 commented Oct 20, 2021

I'm not sure, maybe it would be better to move jest-transformer.js to scripts/jest-transformer.js?

I think that's ok as it is now.

Copy link
Member

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thanks for your contribution!
Looks great 👍

@dej611 dej611 merged commit af9293c into italia:master Oct 20, 2021
@toptalo
Copy link
Contributor Author

toptalo commented Oct 20, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ops] Sort out Jest warnings in Storyshots for mdx stories
2 participants