https://github.com/kaizhu256/v8-coverage-report
this zero-dependency package will create coverage-reports directly from raw v8-coverage-files
https://github.com/kaizhu256/v8-coverage-report
Last synced: about 2 months ago
JSON representation
this zero-dependency package will create coverage-reports directly from raw v8-coverage-files
- Host: GitHub
- URL: https://github.com/kaizhu256/v8-coverage-report
- Owner: kaizhu256
- License: unlicense
- Created: 2021-10-14T01:54:51.000Z (over 3 years ago)
- Default Branch: beta
- Last Pushed: 2021-10-14T07:52:07.000Z (over 3 years ago)
- Last Synced: 2025-02-17T23:15:50.153Z (2 months ago)
- Language: JavaScript
- Size: 12.8 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# this zero-dependency package will create coverage-reports directly from raw v8-coverage-files
# Status
| Branch | [master
(v2021.10.13)](https://github.com/kaizhu256/v8-coverage-report/tree/master) | [beta
(Web Demo)](https://github.com/kaizhu256/v8-coverage-report/tree/beta) | [alpha
(Development)](https://github.com/kaizhu256/v8-coverage-report/tree/alpha) |
|--:|:--:|:--:|:--:|
| CI | [](https://github.com/kaizhu256/v8-coverage-report/actions?query=branch%3Amaster) | [](https://github.com/kaizhu256/v8-coverage-report/actions?query=branch%3Abeta) | [](https://github.com/kaizhu256/v8-coverage-report/actions?query=branch%3Aalpha) |
| Coverage | [](https://kaizhu256.github.io/v8-coverage-report/branch-master/.artifact/coverage/index.html) | [](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage/index.html) | [](https://kaizhu256.github.io/v8-coverage-report/branch-alpha/.artifact/coverage/index.html) |
| Artifacts | [](https://github.com/kaizhu256/v8-coverage-report/tree/gh-pages/branch-master/.artifact) | [
](https://github.com/kaizhu256/v8-coverage-report/tree/gh-pages/branch-beta/.artifact) | [
](https://github.com/kaizhu256/v8-coverage-report/tree/gh-pages/branch-alpha/.artifact) |
# Table of Contents
1. [API Doc](#api-doc)
2. [Quickstart Install](#quickstart-install)
- [To install, run npm install:](#to-install-run-npm-install)3. [Quickstart V8 Coverage Report](#quickstart-v8-coverage-report)
- [To create V8 coverage report from Node.js / Npm program in shell:](#to-create-v8-coverage-report-from-nodejs--npm-program-in-shell)
- [To create V8 coverage report from Node.js / Npm program in javascript:](#to-create-v8-coverage-report-from-nodejs--npm-program-in-javascript)4. [Package Listing](#package-listing)
5. [Changelog](#changelog)
6. [License](#license)
# API Doc
- https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/apidoc.html[](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/apidoc.html)
# Quickstart Install
### To install, run npm install:
```shell
#!/bin/shnpm install v8-coverage-report
```# Quickstart V8 Coverage Report
### To create V8 coverage report from Node.js / Npm program in shell:
```shell
#!/bin/sh
npm install v8-coverage-reportgit clone https://github.com/mapbox/node-sqlite3 node-sqlite3-sh \
--branch=v5.0.2 \
--depth=1 \
--single-branchcd node-sqlite3-sh
npm install# Create V8 coverage report from program `npm run test` in shell.
npx v8-coverage-report \
v8_coverage_report=../.artifact/coverage_sqlite3_sh/ \
npm run test
```
- screenshot file [.artifact/coverage_sqlite3_sh/index.html](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_sh/index.html)[](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_sh/index.html)
- screenshot file [.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html)
[](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html)
- shell output

### To create V8 coverage report from Node.js / Npm program in javascript:
```shell
#!/bin/sh
npm install v8-coverage-reportgit clone https://github.com/mapbox/node-sqlite3 node-sqlite3-js \
--branch=v5.0.2 \
--depth=1 \
--single-branchcd node-sqlite3-js
npm installnode --input-type=module -e '
/*jslint node*/
import v8_coverage_report from "v8-coverage-report";
(async function () {// Create V8 coverage report from program `npm run test` in javascript.
await v8_coverage_report.v8CoverageReportCreate({
coverageDir: "../.artifact/coverage_sqlite3_js/",
processArgv: ["npm", "run", "test"]
});
}());'
```
- screenshot file [.artifact/coverage_sqlite3_js/index.html](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_js/index.html)[](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_js/index.html)
- screenshot file [.artifact/coverage_sqlite3_js/lib/sqlite3.js.html](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_js/lib/sqlite3.js.html)
[](https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/coverage_sqlite3_js/lib/sqlite3.js.html)
- shell output

# Package Listing
# Changelog
- [Full CHANGELOG.md](CHANGELOG.md)
# License
- v8-coverage-report is under [Unlicense License](LICENSE).
- Function `v8CoverageListMerge` is derived from [MIT Licensed v8-coverage](https://github.com/demurgos/v8-coverage/blob/73446087dc38f61b09832c9867122a23f8577099/ts/LICENSE.md).