【发布时间】:2020-02-26 00:16:07
【问题描述】:
有没有办法在使用 Jest 运行测试时看到更好的控制台输出?
每次测试失败时,无论出现什么问题,我都只会在控制台中看到以下输出
Found 1 matching tests...
FAIL test\jestTests\xxx.spec.js (1.468s)
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
此外,如果文件中的所有测试都通过了,我看到的唯一输出如下
Found 1 matching tests...
PASS test\jestTests\xxx.spec.js (1.716s)
我想如果我设置,我可能会得到更好的输出
jasmine.VERBOSE = true;
但这似乎并没有改变任何东西。使用默认配置,您没有得到更多的东西,这似乎很奇怪。我在这里做错了吗?
【问题讨论】: