我正在用Jest测试一个React/Typescript组件,然后遇到这个错误:SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse在Jest中,这似乎是要被嘲笑的,但不知道该如何去做。编辑:const mockHistoryPush = jest.fn();
jest.mock('react-router-dom
我想使用jest.retryTimes() &为此,我已经安装了jest-circus,但是在运行测试时得到了jasmine,而没有定义错误。为了实现上述目标,我在jest.config.js中添加了testRunner: "jest-circus/runner" 我在jest test runner中使用puppeteer框架。确切错误:测试套件无法运行 ReferenceError:未定义jasmine at registerAllureRepo