-
-
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
Jest doesn't work with Parcel out of the box, as the docs suggest #11308
Comments
I think Jest doc needs a guide like this https://jestjs.io/docs/webpack |
Correct me if I'm wrong, but that guide doesn't seem to show how to use Webpack and Jest together, but rather how to translate Webpack config to Jest config, no? |
I’ve never tried that guide tbh. Perhaps you should ask in Jest Discord community to get help. This is not something provided out-of-the-box so I don’t think it is a Jest issue. |
I'd say that the fact that Jest has documentation that is incorrect and/or misleading is a Jest issue. In this particular case, the person who wrote the following supposedly meant to link to something useful:
However, as far as I can tell the official Parcel docs are not useful when it comes to using Jest with Parcel, so I think one of two actions are appropriate:
Don't you agree? |
I've never used Parcel, so I'm not the person to update it. I think ideally we'd figure out what is needed and then update the guide. Would you be up for that? I'm also happy to just remove it seeing as it's currently somewhat misleading. /cc @gkanishk |
Hey @SimenB , I can work on documentation. We need to config babel along with parcel to work along with jest |
👍 I wouldn't know what to write anyway - I'm using parcel and jest and they both work fine, independently of each other. |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
The Getting Started page states:
This implies (to me) that Parcel can do preprocessing before Jest runs, and that I don't need to do anything to make it work. However, this does not seem to be the case. When I run Jest with some files that use
import
andexport
, I get:Parcel can build the code without problem.
The linked Parcel documentation is not helpful AFAICS.
To Reproduce
npm install
npm test
Expected behavior
Jest uses Parcel to bundle/preprocess before running tests.
The text was updated successfully, but these errors were encountered: