我正在尝试将ES6模块用于我的Jest单元测试,所以我遵循了2020 updated instructions来实现这一点。然而,在遵循这些说明之后,我在运行单元测试时得到了错误ReferenceError: jest is not defined。": { "jest": "^26.6.3",
"jest-environ
我正在为一个客户开发一个新项目,并被要求将create-react-app (react-scripts)从v.2.0.5更新到v.4.0.3。我这样做了,很多单元测试都失败了。Jest报告测试超时,但这些测试只是超时,因为它们失败了。它们在早期版本的react-scripts (以及我猜的早期版本的Jest )上都通过了,没有问题。Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-runnin