Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

make-coverage-badge

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

make-coverage-badge

Create a coverage badge

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
decreased by-13.66%
Maintainers
1
Weekly downloads
 
Created
Source

make-coverage-badge

Build Status npm version License

Create a coverage badge

Creates a code coverage badge like the following:

Coverage badge

Currently just reads from Istanbul's JSON summary reporter and downloads a badge from https://shields.io/. Don't expect too much! Send a PR if you need configuration etc.

Usage

(For Create React Apps)

  1. Configure Jest (in package.json):
"jest": {
  "coverageReporters": [
    "json-summary"
  ]
}
  1. Run npm test -- --coverage
  2. Run make-coverage-badge

Resulting badge will be in ./coverage/badge.svg.

Options

--output-path <path>

Writes the coverage badge to the given path (relative to project root). Defaults to ./coverage/badge.svg.

--report-path <path>

Path to a coverage report file. Defaults to ./coverage/coverage-summary.json.

Prior work

  • Coveralls: paid for private repos
  • coverage-badger: same approach, but using an XML report and therefore requires XML dependencies

Author

© 2019 Tom Vincent git@tlvince.com (https://tlvince.com)

License

Released under the MIT license.

Keywords

FAQs

Package last updated on 04 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc