javascript - Is it possible to show only the summary of a Mocha test suite in the cli report? - Stack Overflow

I run my Mocha tests using the following mand:mocha --pilers js:babel-coreregister --recursive --color

I run my Mocha tests using the following mand:

mocha --pilers js:babel-core/register --recursive --colors --watch

The tests work perfectly, but I am not satisfied with the look of the report in the terminal. For a TDD approach I want to write a lot of tests beforehand that all fail, then make start to write the code that makes them pass.

Right now I get the summary of test results on top, then details for every failed test. I want to see the summary at the end, so I don't have to scroll through the terminal every time I check.

How can I move the summary to the bottom? Can I make a separate test mand that ONLY shows the summary?

Thanks for any help

I run my Mocha tests using the following mand:

mocha --pilers js:babel-core/register --recursive --colors --watch

The tests work perfectly, but I am not satisfied with the look of the report in the terminal. For a TDD approach I want to write a lot of tests beforehand that all fail, then make start to write the code that makes them pass.

Right now I get the summary of test results on top, then details for every failed test. I want to see the summary at the end, so I don't have to scroll through the terminal every time I check.

How can I move the summary to the bottom? Can I make a separate test mand that ONLY shows the summary?

Thanks for any help

Share Improve this question asked Nov 19, 2016 at 13:09 Mauro BringolfMauro Bringolf 5385 silver badges14 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

What you are seeing is the default reporter spec:

This is the default reporter. The “spec” reporter outputs a hierarchical view nested just as the test cases are.

If you have lots of tests the output from the spec reporter can easily fill several pages in your console. What you probably want is a more pact test reporter, like dot-matrix

The dot matrix (or “dot”) reporter is simply a series of characters which represent test cases. Failures highlight in red exclamation marks (!), pending tests with a blue ma (,), and slow tests as yellow. Good if you prefer minimal output.

You can call the dot matrix reporter with mocha -R dot

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745385984a4625441.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信