# mongoreporter

> mocha reporter to mongo backend

Latest version **0.2.1** (published 2016-01-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongoreporter
pnpm add mongoreporter
yarn add mongoreporter
bun add mongoreporter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2016-01-10 |
| First published | 2015-04-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | aumkara@gmail.com |
| Maintainers | coyotebringsfire |
| Keywords | mongo, mocha, reporter, ci |

## Links

- npm: https://www.npmjs.com/package/mongoreporter
- Repository: https://github.com/coyotebringsfire/mocha-mongo-reporter
- Homepage: https://github.com/coyotebringsfire/mocha-mongo-reporter#readme
- Issues: https://github.com/coyotebringsfire/mocha-mongo-reporter/issues
- npm.io page: https://npm.io/package/mongoreporter

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^2.1.3
- [mongodb](https://npm.io/package/mongodb.md) ^2.0.27
- [dateformat](https://npm.io/package/dateformat.md) ^1.0.11
- [env-snapshot](https://npm.io/package/env-snapshot.md) 0.0.3

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2016-01-10
- 0.2.0 — 2016-01-10
- 0.1.2 — 2015-08-17
- 0.1.1 — 2015-05-17
- 0.1.0 — 2015-04-21
- 0.0.22 — 2015-04-14
- 0.0.21 — 2015-04-14
- 0.0.20 — 2015-04-14
- 0.0.19 — 2015-04-14
- 0.0.18 — 2015-04-13
- 0.0.17 — 2015-04-13
- 0.0.16 — 2015-04-13
- 0.0.14 — 2015-04-13

## README

#mongoreporter
##Description
A reporter for mocha that stores results directly to a mongo db

##Usage
Install mongoreporter from npm. When running from the command line, you have to specify --no-exit
```sh
$ npm install mongoreporter
...
$ MONGOURL=mongodb://dbuser:dbpassword@dbhost:dbport/dbname mocha -R mongoreporter test/one.js --no-exit
```
programmatically:
```sh
var mocha = new Mocha({
    ui: 'bdd',
    reporter: "mongoreporter",
    reporterOption: {
    	url: "mongodb://dbuser:dbpassword@dbhost:dbport/dbname"
	}
});
mocha.addFile("test/one.js");
mocha.run(...);
```

I like to use this with mocha-multi reporter, using spec to print test results, something like this
```sh
$ npm install mocha-multi
...
$ npm install mongoreporter
...
$ MONGOURL="mongodb://localhost:27017/testruns" multi="spec=- mongoreporter=/dev/null" mocha -R mocha-multi
```

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