Skip to content

Mocha reporter that generates API spec description for README

Notifications You must be signed in to change notification settings

twada/mocha-spec-tree-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@twada/mocha-spec-tree-reporter

Mocha reporter that generates API spec description for README

Build Status NPM version License

USAGE

mocha test --reporter @twada/mocha-spec-tree-reporter

SPEC

MochaSpecTreeReporter: generates API spec description for README

  • when rendering top level tests:
    • renders bullet list marker - at the beginning of a line, followed by test title
  • when top level suites enclose tests:
    • renders headings ### at the beginning of a line, followed by top level suite title
    • renders bullet list marker with indentation - at the beginning of a line, followed by inner test title
  • when top level outer suites enclose inner suites, and inner suites enclose innermost tests:
    • renders headings ### at the beginning of a line, followed by top level outer suite title
    • renders bullet list marker with indentation - at the beginning of a line, followed by inner suite title
    • renders bullet list marker with double indentation - at the beginning of a line, followed by innermost test title
  • when multiple top level suites exist:
    • insert blank line after each top level suite

EXAMPLE

See self-hosting tests and its output.

INSTALL

$ npm install @twada/mocha-spec-tree-reporter

AUTHOR

LICENSE

Licensed under the MIT license.

About

Mocha reporter that generates API spec description for README

Resources

Stars

Watchers

Forks

Packages

No packages published