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 badges1 Answer
Reset to default 6What 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条)