Doc
Alias: Doc
, doc
The Doc reporter outputs a hierarchical HTML body representation of your tests. Wrap it with a header, footer, and some styling, then you have some fantastic documentation!
For example, suppose you have the following JavaScript:
The command mocha --reporter doc array
would yield:
The SuperAgent request library test documentation was generated with Mocha’s doc reporter using this Bash command:
View SuperAgent’s Makefile for reference.