{"id":20630185,"url":"https://github.com/macacajs/macaca-coverage","last_synced_at":"2025-03-08T17:24:46.916Z","repository":{"id":27633411,"uuid":"114541816","full_name":"macacajs/macaca-coverage","owner":"macacajs","description":"Macaca coverage tool","archived":false,"fork":false,"pushed_at":"2023-04-25T09:39:41.000Z","size":456,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-20T13:04:49.261Z","etag":null,"topics":["coverage","macaca"],"latest_commit_sha":null,"homepage":"https://macacajs.github.io/coverage","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macacajs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-17T14:14:17.000Z","updated_at":"2025-01-16T10:27:26.000Z","dependencies_parsed_at":"2024-06-18T19:45:04.424Z","dependency_job_id":"9cc5ec84-9efd-4946-8797-7256d648842b","html_url":"https://github.com/macacajs/macaca-coverage","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.125,"last_synced_commit":"26819233d1e407577bd7e9e852e04e08d24f5b10"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fmacaca-coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fmacaca-coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fmacaca-coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fmacaca-coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macacajs","download_url":"https://codeload.github.com/macacajs/macaca-coverage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242583460,"owners_count":20153462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","macaca"],"created_at":"2024-11-16T14:07:08.975Z","updated_at":"2025-03-08T17:24:46.886Z","avatar_url":"https://github.com/macacajs.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macaca-coverage\n\n[![NPM version][npm-image]][npm-url]\n[![build status][CI-image]][CI-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/macaca-coverage.svg\n[npm-url]: https://npmjs.org/package/macaca-coverage\n[CI-image]: https://github.com/macacajs/macaca-coverage/actions/workflows/ci.yml/badge.svg\n[CI-url]: https://github.com/macacajs/macaca-coverage/actions/workflows/ci.yml\n[codecov-image]: https://img.shields.io/codecov/c/github/macacajs/macaca-coverage.svg?logo=codecov\n[codecov-url]: https://app.codecov.io/gh/macacajs/macaca-coverage\n[node-image]: https://img.shields.io/badge/node.js-%3E=_16-green.svg\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/macaca-coverage.svg\n[download-url]: https://npmjs.org/package/macaca-coverage\n\n\u003e Macaca coverage tool\n\n## Use as CLI\n\nInstall Macaca command-line tool form npm\n\n```bash\n$ npm i macaca-coverage -g\n```\n\nSample:\n\n```bash\n# step1, checkout a new branch\n$ git checkout -b new/branch\n# step2, modify code and commit ...\n# step3, run testcase\n$ npm i\n$ npm run test\n# step4, gen diff reporter\n$ ./bin/macaca-coverage.js diff --target-branch master --coverage-json-file ./coverage/coverage-final.json --output ./test/temp\n```\n\n## Use as Node.js module\n\nInstall it form npm\n\n```bash\n$ npm i macaca-coverage --save-dev\n```\n\n```javascript\nimport Coverage from 'macaca-coverage';\n\nconst {\n  collector,\n  Reporter,\n} = Coverage({\n  runtime: 'web' // web, iOS, Android\n});\n\nconst reporter = new Reporter();\n\ncollector.add(__coverage__);\n\nreporter.addAll([\n  'html',\n  'lcov'\n]);\n\nreporter.write(collector, true, () =\u003e {\n});\n```\n\n\u003c!-- GITCONTRIBUTOR_START --\u003e\n\n## Contributors\n\n|[\u003cimg src=\"https://avatars.githubusercontent.com/u/1011681?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003exudafeng\u003c/b\u003e\u003c/sub\u003e](https://github.com/xudafeng)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/52845048?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003esnapre\u003c/b\u003e\u003c/sub\u003e](https://github.com/snapre)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/30293087?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eJodeee\u003c/b\u003e\u003c/sub\u003e](https://github.com/Jodeee)\u003cbr/\u003e|\n| :---: | :---: | :---: |\n\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Apr 25 2023 15:58:15 GMT+0800`.\n\n\u003c!-- GITCONTRIBUTOR_END --\u003e\n\n## License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacacajs%2Fmacaca-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacacajs%2Fmacaca-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacacajs%2Fmacaca-coverage/lists"}