Gathering detailed insights and metrics for coverage-node
Gathering detailed insights and metrics for coverage-node
Gathering detailed insights and metrics for coverage-node
Gathering detailed insights and metrics for coverage-node
c8
output coverage reports using Node.js' built in coverage
typescript-coverage-report
Node command tool to generate TypeScript coverage report.
grunt-jasmine-node-coverage
Grunt task for running jasmine-node using istanbul for code coverage reports. Based off of grunt-jasmine-node by Omar Gonzalez (s9tpepper).
node-coverage-badges
Generating coverage badges from jest
A simple CLI to run Node.js and report code coverage.
npm install coverage-node
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
187,500
Last Day
650
Last Week
2,303
Last Month
6,527
Last Year
55,797
MIT License
56 Stars
119 Commits
3 Forks
3 Watchers
1 Branches
2 Contributors
Updated on Jan 03, 2025
Latest Version
8.0.0
Package Id
coverage-node@8.0.0
Unpacked Size
20.06 kB
Size
6.72 kB
File Count
11
NPM Version
8.15.0
Node Version
18.7.0
Cumulative downloads
Total Downloads
Last Day
30.3%
650
Compared to previous day
Last Week
41.4%
2,303
Compared to previous week
Last Month
20.6%
6,527
Compared to previous month
Last Year
-13.4%
55,797
Compared to previous year
A simple CLI to run Node.js and report code coverage.
c8
v7.11.1 or 8.84 MB for nyc
v15.1.0.To install coverage-node
with npm, run:
1npm install coverage-node --save-dev
In a package.json
script, replace the node
command with coverage-node
:
1 { 2 "scripts": { 3- "test": "node test.mjs" 4+ "test": "coverage-node test.mjs" 5 } 6 }
Supported operating systems:
Supported runtime environments:
^14.17.0 || ^16.0.0 || >= 18.0.0
.Projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check
comment:
compilerOptions.allowJs
should be true
.compilerOptions.maxNodeModuleJsDepth
should be reasonably large, e.g. 10
.compilerOptions.module
should be "node16"
or "nodenext"
.Code coverage analysis ignores:
node_modules
directory files, e.g. node_modules/foo/index.mjs
.test
directory files, e.g. test/index.mjs
..test
prefixed before the extension, e.g. foo.test.mjs
.test
(regardless of extension), e.g. test.mjs
.In source code, a comment (case insensitive) can be used to ignore code coverage ranges that start on the the next line:
1// coverage ignore next line 2if (false) console.log("Never runs.");
coverage-node
Substitutes the normal node
command; any node
CLI options can be used to run a test script. If the script doesn’t error a code coverage analysis is reported to the console, and if coverage is incomplete and there isn’t a truthy ALLOW_MISSING_COVERAGE
environment variable the process exits with code 1
.
npx
can be used to quickly check code coverage for a script:
1npx coverage-node test.mjs
1{ 2 "scripts": { 3 "test": "coverage-node test.mjs" 4 } 5}
A package.json
script that allows missing coverage:
1{ 2 "scripts": { 3 "test": "ALLOW_MISSING_COVERAGE=1 coverage-node test.mjs" 4 } 5}
The npm package coverage-node
features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json
field exports
:
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/26 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More