Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scriptnull/mocha-github-reporter
Delivering mocha results from CI to Github. 📋
https://github.com/scriptnull/mocha-github-reporter
continuous-integration github mocha mocha-reporter tdd
Last synced: 2 months ago
JSON representation
Delivering mocha results from CI to Github. 📋
- Host: GitHub
- URL: https://github.com/scriptnull/mocha-github-reporter
- Owner: scriptnull
- License: mit
- Created: 2017-02-25T18:48:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-01T14:48:47.000Z (over 2 years ago)
- Last Synced: 2024-10-16T08:32:41.921Z (2 months ago)
- Topics: continuous-integration, github, mocha, mocha-reporter, tdd
- Language: JavaScript
- Size: 632 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mocha-github-reporter
[![npm](https://img.shields.io/npm/v/mocha-github-reporter.svg)]() ![code style standard](https://img.shields.io/badge/code_style-standard-brightgreen.svg) ![license](https://img.shields.io/github/license/scriptnull/mocha-github-reporter.svg)
Delivering mocha results from CI to Github. 📋
## Install
```bash
$ npm install --save-dev mocha-github-reporter
```## Usage
Setup environment variables.| ENVIRONMENT VARIABLE | EXAMPLE |
|----------------------|---------|
| GITHUB_ACCESS_TOKEN | XXXXX |
| GITHUB_REPO_SLUG | scriptnull/mocha-github-reporter |
| REPORT_TITLE | Mocha report for Build $BUILD_NUMBER |
| REPORT_ALWAYS | true |
| REPORT_FORMATTER | `all-suites` (default). See below for more. |Run mocha.
```bash
$ mocha --reporter mocha-github-reporter tests/
```
## Reports
Any one of the following report formats could be setup by specifying it as `REPORT_FORMATTER` environment variable.### all-suites
Resembles default mocha reporting.
![all-suites](/screens/all-suites.png)### all-suites-emoji
emoji can be configured via `PASSED_EMOJI` and `FAILED_EMOJI` environment variables. Example: FAILED_EMOJI='poop'
![all-suites-emoji](/screens/all-suites-emoji.png)### failed-checklist
Suited to be used as a checklist for sending PR fixes.
![failed-checklist](/screens/failed-checklist.png)## Contribute
- Bug fixes.
- Adding new formatters.[Open issue](https://github.com/scriptnull/mocha-github-reporter/issues/new) to discuss more.
## Thanks
> "Thanks for taking time to evaluate `mocha-github-reporter`. It means a lot to this project. I hope that, this project takes you one step closer to a supercharged workflow" - [scriptnull](https://twitter.com/scriptnull)