您如何在 WebStorm IDE 中重新 运行 失败的 mocha 测试?

How do you re-run failed mocha tests in the WebStorm IDE?

我在 WebStorm 11.0.3 中使用 Mocha Run/Debug 配置。我可以在底部的面板中看到我所有通过和失败的测试。

根据 WebStorm documentation,我可以 "rerun the tests" 或 "stop and rerun the tests",但我没有看到仅重新 运行 失败测试的选项。

Google 搜索显示 "rerun failed tests" 存在于 PhpStorm and IntelliJ IDEA,另外两个 JetBrains 产品中。也许他们只是将其排除在 WebStorm 之外?

如果它不是内置功能,有没有办法用 mocha 做到这一点,也许是通过创建报告并阅读每个 运行 的报告?

Mocha 没有可用的“Rerun Failed Tests”操作。将是一个有用的功能,请随时向 youtrack

提出申请

事实上 "ReRun Failed Tests" 用于 Mocha 测试的 WebStorm 现已可用。

https://www.jetbrains.com/help/webstorm/rerunning-tests.html