https://github.com/kuldeepkeshwar/code-coverage-from-v8-demo
Demo for getting code coverage from v8
https://github.com/kuldeepkeshwar/code-coverage-from-v8-demo
code-coverage v8
Last synced: 2 months ago
JSON representation
Demo for getting code coverage from v8
- Host: GitHub
- URL: https://github.com/kuldeepkeshwar/code-coverage-from-v8-demo
- Owner: kuldeepkeshwar
- License: mit
- Created: 2018-10-12T09:13:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T19:30:08.000Z (almost 8 years ago)
- Last Synced: 2025-02-23T19:23:48.875Z (over 1 year ago)
- Topics: code-coverage, v8
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Demo to show how to get code coverage directly from V8.
### Setup
1. Clone the Repo
2. Install Dependencies `npm install`
3. Run `npm run coverage`
### Explanation
* To extract coverage, all you need to do is to set environment variable `NODE_V8_COVERAGE` & Node.js will begin outputting V8 JavaScript code coverage to the directory provided as an argument.
e.g `NODE_V8_COVERAGE=coverage node src/main.js`
* To get report in human readable format you can use [c8](https://github.com/bcoe/c8)
e.g `NODE_V8_COVERAGE=coverage c8 node src/main.js`