Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macacajs/macaca-coverage
Macaca coverage tool
https://github.com/macacajs/macaca-coverage
coverage macaca
Last synced: about 1 month ago
JSON representation
Macaca coverage tool
- Host: GitHub
- URL: https://github.com/macacajs/macaca-coverage
- Owner: macacajs
- License: mit
- Created: 2017-12-17T14:14:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-25T09:39:41.000Z (over 1 year ago)
- Last Synced: 2024-11-11T19:08:08.772Z (about 1 month ago)
- Topics: coverage, macaca
- Language: HTML
- Homepage: https://macacajs.github.io/coverage
- Size: 445 KB
- Stars: 10
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# macaca-coverage
[![NPM version][npm-image]][npm-url]
[![build status][CI-image]][CI-url]
[![Test coverage][codecov-image]][codecov-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/macaca-coverage.svg
[npm-url]: https://npmjs.org/package/macaca-coverage
[CI-image]: https://github.com/macacajs/macaca-coverage/actions/workflows/ci.yml/badge.svg
[CI-url]: https://github.com/macacajs/macaca-coverage/actions/workflows/ci.yml
[codecov-image]: https://img.shields.io/codecov/c/github/macacajs/macaca-coverage.svg?logo=codecov
[codecov-url]: https://app.codecov.io/gh/macacajs/macaca-coverage
[node-image]: https://img.shields.io/badge/node.js-%3E=_16-green.svg
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/macaca-coverage.svg
[download-url]: https://npmjs.org/package/macaca-coverage> Macaca coverage tool
## Use as CLI
Install Macaca command-line tool form npm
```bash
$ npm i macaca-coverage -g
```Sample:
```bash
# step1, checkout a new branch
$ git checkout -b new/branch
# step2, modify code and commit ...
# step3, run testcase
$ npm i
$ npm run test
# step4, gen diff reporter
$ ./bin/macaca-coverage.js diff --target-branch master --coverage-json-file ./coverage/coverage-final.json --output ./test/temp
```## Use as Node.js module
Install it form npm
```bash
$ npm i macaca-coverage --save-dev
``````javascript
import Coverage from 'macaca-coverage';const {
collector,
Reporter,
} = Coverage({
runtime: 'web' // web, iOS, Android
});const reporter = new Reporter();
collector.add(__coverage__);
reporter.addAll([
'html',
'lcov'
]);reporter.write(collector, true, () => {
});
```## Contributors
|[
xudafeng](https://github.com/xudafeng)
|[
snapre](https://github.com/snapre)
|[
Jodeee](https://github.com/Jodeee)
|
| :---: | :---: | :---: |This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Apr 25 2023 15:58:15 GMT+0800`.
## License
The MIT License (MIT)