Closed drmacm closed 7 months ago
Thank you for posting this issue. 🙇🏼♂️
We will come back to you shortly.
Hello,
This issue occurs because Jest v28 stopped bundling the extra jest-environment-jsdom dependency. This is required for LWC, and has been pre-packaged by sfdx-lwc-jest. I'll update sfdx-lwc-jest to get it fixed.
Thanks for your contribution!
Summary
After cloning the repo, VSCode's Test Explorer is unable to run the tests in the app. The tests work when running
npm run test:unit
in terminal.Fixed by running
npm install jest-environment-jsdom --save-dev
.I can submit a PR with extra dependency if you agree with the approach.
Salesforce Org Type
Scratch Org
Steps To Reproduce
npm install
npm run test:unit
and observe that the tests passCurrent Behavior
All tests fail
Expected Behavior
All tests pass
Relevant Log Output
Code of Conduct