是否有人成功升级到最新的Jest版本29
?
我收到一个错误:
Error: Test environment jest-environment-jsdom cannot be found. Make sure the testEnvironment configuration option points to an existing node module.
发布于 2022-04-26 12:03:31
Jest团队在28.0.1
版本中添加了更多的28.0.1
Error: ...
As of Jest 28 "jsdom" is no longer shipped by default, make sure to install it separately.
安装jsdom
包解决了以下问题:
# npm
npm install -D jest-environment-jsdom
# yarn
yarn add -D jest-environment-jsdom
https://stackoverflow.com/questions/72013449
复制相似问题