As of Jest 28 "jest-environment-jsdom" is no longer shipped by default, make sure to install it separately.
As the error says, the package for jest-environment-jsdom isn't bundled anymore with the base jest library, so you'll have to install it separately with:
npm install jest-environment-jsdom --save-dev
Happy coding ;)
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For the Jest part, while attempting to run the tests script you might encounter the error:
As the error says, the package for jest-environment-jsdom isn't bundled anymore with the base jest library, so you'll have to install it separately with:
npm install jest-environment-jsdom --save-dev
Happy coding ;)