1.1.1 • Published 3 years ago

mocha-dd-reporter v1.1.1

Weekly downloads
123
License
ISC
Repository
github
Last release
3 years ago

mocha-dd-reporter

Mocha test reporter that captures tests output and displays it along with error messages. Output of sucessfull tests is hidden to reduce noise.

NPM

Example

example

Why

Output emitted during a test may carry helpful insights on what went wrong. Default mocha reporter displays test error message at the bottom, while logs emitted during that test end up somewhere in the middle of the report, along with logs emitted during all other tests. This is unfortunate and makes finding specific test output inconvenient, specially if there are a lot of tests and report is long.

This package aims to solve the above problem by capturing stdout and stderr during tests, so that:

  • Output emitted during a failed test as well as its before and beforeEach hooks is annotated and displayed just below the error message.
  • Output of all sucessfull tests is not displayed at all, making the overall report shorter and less noisy.

Install

Requires mocha 7.x

npm install --save-dev mocha-dd-reporter

Use

Add --reporter mocha-dd-reporter when running tests with mocha. Eg.

npx mocha --reporter mocha-dd-reporter **/*.spec.js
1.1.1

3 years ago

1.1.1-0

3 years ago

1.1.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.1-4

4 years ago

1.0.1-3

4 years ago

1.0.1-2

4 years ago

1.0.1-1

4 years ago

1.0.1-0

4 years ago