-
-
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
Not working if Jest is installed by pnpm #5369
Comments
I just discovered that the test will fail if |
@SimenB I tried with v22.0.4 and v22.1.4,
|
Adding my +1 to this. I've loved Jest for testing both React and Node, but our team recently switched to PNPM. The gains from PNPM are too great to go back. I've tried a few things but nothing seems to be working. Replacing The first thing I see is EDIT: I got it working by adding the transform as seen in the issue creator's Jest config. I'm not sure why that's needed for pnpm but not for regular npm. It still requires me to explicitly add jest-environment-jsdom as a dependency in my project. |
Possibly related: facebook/metro#231 They both use |
I think this issue can be closed? |
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. |
Do you want to request a feature or report a bug?
Bug
Steps to reprocedure:
yarn global add pnpm
)pnpm install
to install dependenciespnpx jest
to run testnode_modules
yarn jest
What is the current behavior?
Step 4 fails but step 6 doesn't.
What is the expected behavior?
Step 4 doesn't fail.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Related issue: pnpm/pnpm#1007
UPDATE:
jest
doesn't work butjest-cli
does.The text was updated successfully, but these errors were encountered: