# mocha-better-spec-reporter

> Just a bit better spec reporter for Mocha

Latest version **3.1.0** (published 2016-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install mocha-better-spec-reporter
pnpm add mocha-better-spec-reporter
yarn add mocha-better-spec-reporter
bun add mocha-better-spec-reporter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2016-12-04 |
| First published | 2014-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34 |
| Author | Denis Bardadym |
| Maintainers | btd |
| Keywords | mocha, reporter, spec |

## Links

- npm: https://www.npmjs.com/package/mocha-better-spec-reporter
- Repository: https://github.com/btd/mocha-better-spec-reporter
- Issues: https://github.com/btd/mocha-better-spec-reporter/issues
- npm.io page: https://npm.io/package/mocha-better-spec-reporter

## Dependencies (9)

- [diff](https://npm.io/package/diff.md) ^3.1.0
- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.3
- [source-map](https://npm.io/package/source-map.md) ^0.5.6
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.1.3
- [should-type](https://npm.io/package/should-type.md) ^1.4.0
- [stack-trace](https://npm.io/package/stack-trace.md) 0.0.9
- [should-format](https://npm.io/package/should-format.md) ^3.0.2
- [data-uri-to-buffer](https://npm.io/package/data-uri-to-buffer.md) 0.0.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2016-12-04
- 3.0.2 — 2016-03-31
- 3.0.1 — 2015-11-06
- 3.0.0 — 2015-10-23
- 2.1.3 — 2015-10-20
- 2.1.2 — 2015-09-13
- 2.0.2 — 2015-09-13
- 2.1.1 — 2015-06-18
- 2.1.0 — 2015-06-15
- 2.0.1 — 2015-01-20
- 2.0.0 — 2015-01-18
- 1.1.2 — 2015-01-18
- 1.1.1 — 2014-10-22
- 1.1.0 — 2014-10-18
- 1.0.2 — 2014-10-18
- … 4 more at https://npm.io/package/mocha-better-spec-reporter/versions

## README

mocha-better-spec-reporter
==========================

Originally it was fork for mocha own spec reporter, but it is very inconvenient to use.

Why i made fork:
  * It is possible to hide/show any part of report
  * It is possible to see where error happen - not only stack line but also relevant file content
  * It supports source maps
  * It does not show useless stack lines

## Env variables usage

It is possible to hide additional stack traces via env variable `MOCHA_REPORTER_STACK_EXCLUDE` as glob string.

`**/yadda/lib/**` - will hide all of the yadda stack traces

It is possible to hide some parts of output via env variable `MOCHA_REPORTER_OPTS`.

`hide-titles` - will hide execution tests/suites titles

`hide-stats` - will hide stat

`clear-screen` - will clear the screen on start

`show-back-order` - will show fails in back order

## Command line usage

Also it is possible to set this parameters with mocha command line option `--reporter-options`, e.g:
```
mocha -R ../../../ --reporter-options hide-stats=true,hide-titles=true test.js
```

You need to set options in such format A=B,C=D.... Options are:

`hide-titles` accepted values `true`|`false` - show/hide executed test/suites titles (default `false`)

`hide-stats` accepted values `true`|`false` - show/hide executed tests statistic (default `false`)

`clear-screen` accepted values `true`|`false` - clear the screen before executing tests (default `false`)

`show-back-order` accepted values `true`|`false` - test fails shown in back order, so first fail will be at the bottom (default `true`)

`stack-exclude` any glob string, used to match stack trace files for exclude

`show-file-content` it can be `js` or `js+sm` or `sm`, meaning what to show if  available (sm - source-mapped files, js - actual files) by default it is `sm`

How to use
=======

```
npm install --save-dev mocha-better-spec-reporter
```

```
mocha --reporter mocha-better-spec-reporter ... # and other options there
mocha -R mocha-better-spec-reporter --reporter-options hide-stats=true,hide-titles=true ...
```

Screenshot
==========
![screenshot](https://cloud.githubusercontent.com/assets/334851/4676893/a6951042-55e0-11e4-812d-04fe09241d6a.png)

---
_Source: https://npm.io/package/mocha-better-spec-reporter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
