ryanrigby17 / coverbadge

:100: Create a coverage badge without any service provider.

Home Page:https://npm.im/coverbadge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coverbadge

Create a coverage badge without any service provider.

CircleCI

See it in action

coverage

💯 Coverage increased (+1.81%) to 100%.

Installation

yarn add -D coverbadge
# OR
npm install --save-dev coverbadge

Usage

cat coverage/lcov.info | coverbadge [-o <outputPath>]

-o, --out-file

Specify output path to save the badge image. Defaults to badge.svg under your project root.

-o coverage/badge.svg will output the image under your coverage folder.

If you want it to calculate the difference between current and last coverage, you should not delete the old svg path for every build. If you put it in coverage folder and your script remove the folder for every test, you will have to copy the image before removing it, and paste it back to folder immediately after tests and before running this program.

Author

Kai Hao

License

MIT

About

:100: Create a coverage badge without any service provider.

https://npm.im/coverbadge

License:MIT License


Languages

Language:JavaScript 100.0%