
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
coverage-badge-creator
Advanced tools
Coverage Badge Creator creates badges based on your test coverage and inserts them into the README
Coverage Badge Creator is a super easy to use tool for your project. It creates badges based on your test coverage and inserts them into the README. All without any third-party libraries or tools.
npm
:
npm install --save-dev coverage-badge-creator
yarn
:
yarn add --dev coverage-badge-creator
First you need to set up your test environment.
jest
In jest config you need to add 'json-summary' to coverageReporters. https://jestjs.io/docs/en/configuration
mocha
{
"test": "nyc --reporter=json-summary mocha"
}
Insert one of the following keys anywhere in your README. These will be replaced by the coverage-badge-creator with the appropriate badge.
The following keys are available:
important are also the surrounding dollar signs
Now you can create the badges.
Add the command to your package.json scripts block:
"scripts": {
"coverage:badge": "coverage-badge-creator",
}
and run it from the CLI:
npm run coverage:badge
There are various ways to configure the badges according to your wishes. To do this, you only need to create a new file called .badge-config. Then you have the following options:
For a simple example click here.
{
coverage_file_path: './coverage/json-summary.json'
}
{
badges: {
coverage: {
logo: 'foo'
color: 'bar'
}
}
}
Depending on your test tool, you will probably have the following badges available for configuration:
Options
For more information on all options, see ->
In addition, you have further options in the cli.
--config
This allows you to change the path and name of the configuration file.
"scripts": {
"coverage:badge": "coverage-badge-creator --config './badge-coverage-config.json'",
}
This section lists all programming languages and main frameworks.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/new_feature
)git commit -m 'feat: Add new feature'
)git push origin feature/new_feature
)Distributed under the MIT License. See LICENSE
for more information.
This npm package is primarily the work of Henry Steinhauer (H3nSte1n), for full list of contributors see the contributors graph.
FAQs
Coverage Badge Creator creates badges based on your test coverage and inserts them into the README
We found that coverage-badge-creator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.