1

我正在使用 karma 测试运行器来测试 AngularJs 控制器等(Windows 7,phantomJs)

在我的机器上运行测试时,我会在每个已运行的测试的输出中得到一行。例如:

PhantomJS 1.9.1 (Windows 7): Executed 156 of 201 (1 FAILED) (0 secs / 0.423 secs
PhantomJS 1.9.1 (Windows 7): Executed 157 of 201 (1 FAILED) (0 secs / 0.425 secs
PhantomJS 1.9.1 (Windows 7): Executed 158 of 201 (1 FAILED) (0 secs / 0.426 secs
PhantomJS 1.9.1 (Windows 7): Executed 159 of 201 (1 FAILED) (0 secs / 0.427 secs
PhantomJS 1.9.1 (Windows 7): Executed 160 of 201 (1 FAILED) (0 secs / 0.429 secs
PhantomJS 1.9.1 (Windows 7): Executed 161 of 201 (1 FAILED) (0 secs / 0.43 secs)
PhantomJS 1.9.1 (Windows 7): Executed 162 of 201 (1 FAILED) (0 secs / 0.432 secs
PhantomJS 1.9.1 (Windows 7): Executed 163 of 201 (1 FAILED) (0 secs / 0.433 secs
PhantomJS 1.9.1 (Windows 7): Executed 164 of 201 (1 FAILED) (0 secs / 0.434 secs
PhantomJS 1.9.1 (Windows 7): Executed 165 of 201 (1 FAILED) (0 secs / 0.436 secs
PhantomJS 1.9.1 (Windows 7): Executed 166 of 201 (1 FAILED) (0 secs / 0.437 secs
PhantomJS 1.9.1 (Windows 7): Executed 167 of 201 (1 FAILED) (0 secs / 0.438 secs

这很烦人,因为我必须向上滚动很长一段时间才能看到 1 失败测试中的实际错误。我们三个人运行相同的解决方案和相同的 karma.conf 文件。我们两个人遇到了这个问题。另一个没有。

到目前为止,我尝试重新安装业力无济于事。我搞砸了一些环境设置吗?

4

1 回答 1

1

我通过将我的 karma.config.js 文件更改为具有“点”报告来解决此问题。我真的不喜欢样式的变化,当测试失败时,我的终端不再是页面长。

我的旧选择:

reporters: ['progress']

我的新选择:

reporters: ['dots']
于 2014-04-13T16:32:26.980 回答