如何控制 WebStorm 中自动生成的测试目标?

How do I control autogenerated test targets in WebStorm?

我刚刚升级到 WebStorm 2017.1,突然间我的测试文件中有了这些非常好的 "run this test" 按钮:

但是,每当我单击其中一个按钮时,WebStorm 都会自动生成一个 Mocha 测试目标:

问题是,我正在使用 Karma 对该项目进行单元测试。我已经按照 the instructions from the WebStorm documentation 设置 Karma。我已经设置了 Karma 默认值并手动创建了一个 Karma 目标(并删除了所有 Mocha 目标,据我所知),但是 IDE 仍然会在我要求它时自动生成一个 Mocha 目标 运行 测试。

我如何告诉 WebStorm 它应该使用 Karma 来 运行 测试,而不是 Mocha?

official answer from JetBrains as of 2017-03-23 is that running individual tests with Karma is not currently supported. This feature request (about 2.5 years old now) is being tracked as WEB-13173.