0.2.0 • Published 4 years ago

@twada/mocha-spec-tree-reporter v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@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.