Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vodyani/coverage-report
📚 During jest testing, it was used to generate mochawesome compliant json formatted reports.
https://github.com/vodyani/coverage-report
cicd coverage javascript jest mocha mochawesome report test typescript
Last synced: about 5 hours ago
JSON representation
📚 During jest testing, it was used to generate mochawesome compliant json formatted reports.
- Host: GitHub
- URL: https://github.com/vodyani/coverage-report
- Owner: vodyani
- License: mit
- Created: 2022-03-16T06:48:15.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T03:21:22.000Z (7 months ago)
- Last Synced: 2024-04-23T06:51:49.934Z (7 months ago)
- Topics: cicd, coverage, javascript, jest, mocha, mochawesome, report, test, typescript
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Vodyani coverage-report
*📚 During jest testing, it was used to generate mochawesome compliant json formatted reports.*
[![Npm](https://img.shields.io/npm/v/@vodyani/coverage-report)](https://www.npmjs.com/package/@vodyani/coverage-report)
[![Npm](https://img.shields.io/npm/dm/@vodyani/coverage-report)](https://www.npmjs.com/package/@vodyani/coverage-report)
[![License](https://img.shields.io/github/license/vodyani/coverage-report)](LICENSE)
![Workflow](https://github.com/vodyani/coverage-report/actions/workflows/release.yml/badge.svg)
[![Known Vulnerabilities](https://snyk.io/test/github/vodyani/coverage-report/badge.svg?targetFile=package.json)](https://snyk.io/test/github/vodyani/coverage-report?targetFile=package.json)## Installation
```sh
npm install --save-dev @vodyani/coverage-report
```## Usage
Typically, I would add the testResultsProcessor property stated in `JEST` to with the `CI/CD` execution and pass it in to take effect.
First, you should define the test commands in the `package.json` file beforehand.
```json
{
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage"
}
}
```And
```sh
npm run test --ci --testResultsProcessor="@vodyani/coverage-report"
```**Output**
The reporter writes to `report.json` by default. The `JEST_REPORT_JSON` environment variable can be used to alter the file name.
Just like this.
```sh
JEST_REPORT_JSON="./coverage/report.json" npm run test:coverage --ci --testResultsProcessor="@vodyani/coverage-report"
```**Example**
[*Click here to view an example of github activities in action.*](https://github.com/vodyani/workflows/blob/8aab8360f0566cb42d3ff9bcfd94e5ed4ef4b6f3/.github/workflows/publish-codecov.yml#L39)
## License
Vodyani coverage-report is [MIT licensed](LICENSE).