首页 > 解决方案 > jest-circus 无法重试失败的测试

问题描述

我正在尝试设置使用 jest-circus runner 的重试机制。我确实完全按照示例进行了操作,但是没有用。我记得以前可以用,现在不能用了。我的代码在下面,你能给我一些胶水吗?

jest.retryTimes(3)
it('will fail', () => {
  expect(true).toBe(false)
})

我的运行命令是:yarn jest "<path to the test>" --testRunner="jest-circus/runner" --runInBand

类型脚本:4.0.2

开玩笑:24.0.13

笑话马戏团:26.6.3

节点:10.12.27

标签: jestjsjest-circus

解决方案


推荐阅读