
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
badge-js-test-coverage
Advanced tools
Library to create unit test badges coverage to Javascript and Typescript
This library implements badges for JavaScript test coverage. It supports tests using either Mocha or Jest implementations.
Configure Jest or Mock.
Using:
"nyc": "^15.1.0",
Add the following to your package.json
:
"nyc": {
"extension": [
".js"
],
"reporter": [
"json-summary",
"lcov",
"text"
],
"include": [
"src"
],
"exclude": "**/*.mock.js"
}
Run:
nyc report --reporter=lcov --reporter=text --reporter=json-summary
It is necessary to have the .nyc_output
folder.
Run:
jest --coverage --coverageReporters="json-summary"
It is necessary that the coverage folder exists.
npm install
npx badge-js-test-coverage {badges_output}
Example:
npx badge-js-test-coverage badges_output
Add the following to your README.md
:
**Tests Coverage**
| Statements | Branches | Functions | Lines |
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
|  |  |  |  |
That will displays something like:
Tests Coverage
Statements | Branches | Functions | Lines |
---|---|---|---|
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some Feature'
)git push origin feature/Feature
)Distributed under the MIT License. See LICENSE.md
for more information.
Created by: @marialuisacp - contato@malu.dev
FAQs
Library to create unit test badges coverage to Javascript and Typescript
The npm package badge-js-test-coverage receives a total of 0 weekly downloads. As such, badge-js-test-coverage popularity was classified as not popular.
We found that badge-js-test-coverage 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.