May 2018
Intermediate to advanced
492 pages
12h 3m
English
It's cool we have automated test execution, and Mocha makes the test results look nice with all those check marks. What if the management wants a graph of test failure trends over time? Or there could be any number of reasons to report test results as data rather than a user-friendly printout on the console.
Mocha uses what's called a Reporter to report test results. A Mocha Reporter is a module that prints data in whatever format it supports. Information is on the Mocha website: https://mochajs.org/#reporters.
You will find the current list of available reporters like so:
# mocha --reporters dot - dot matrix doc - html documentation spec - hierarchical spec list json - single json object progress - progress ...
Read now
Unlock full access