v8-coverage-report
v2021.10.13
Published
this zero-dependency package will create coverage-reports directly from raw v8-coverage-files
Downloads
6
Readme
this zero-dependency package will create coverage-reports directly from raw v8-coverage-files
Status
| Branch | master(v2021.10.13) | beta(Web Demo) | alpha(Development) | |--:|:--:|:--:|:--:| | CI | | | | | Coverage | | | | | Artifacts | | | |
Table of Contents
API Doc
- https://kaizhu256.github.io/v8-coverage-report/branch-beta/.artifact/apidoc.html
Quickstart Install
To install, run npm install:
#!/bin/sh
npm install v8-coverage-report
Quickstart V8 Coverage Report
To create V8 coverage report from Node.js / Npm program in shell:
#!/bin/sh
npm install v8-coverage-report
git clone https://github.com/mapbox/node-sqlite3 node-sqlite3-sh \
--branch=v5.0.2 \
--depth=1 \
--single-branch
cd 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
- screenshot file .artifact/coverage_sqlite3_sh/lib/sqlite3.js.html
- shell output
To create V8 coverage report from Node.js / Npm program in javascript:
#!/bin/sh
npm install v8-coverage-report
git clone https://github.com/mapbox/node-sqlite3 node-sqlite3-js \
--branch=v5.0.2 \
--depth=1 \
--single-branch
cd node-sqlite3-js
npm install
node --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
- screenshot file .artifact/coverage_sqlite3_js/lib/sqlite3.js.html
- shell output
Package Listing
Changelog
License
- v8-coverage-report is under Unlicense License.
- Function
v8CoverageListMerge
is derived from MIT Licensed v8-coverage.