Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
jest-it-up
Advanced tools
Automatically bump up global Jest thresholds whenever coverage goes above them
Weekly downloads
Readme
Ensure incremental coverage gains are not lost, and positively reinforce good testing habits. Automatically bump up global Jest thresholds whenever coverage goes above them.
jest.config.js
(package.json
config unsupported)json-summary
coverage report (see usage)npm install --save-dev jest-it-up
jest-it-up exposes a standalone CLI tool (see options), but you most likely want to use it in a post-test script.
Within package.json
:
{
"scripts": {
"test": "jest --coverage", // or set `collectCoverage` to `true` in Jest config
"posttest": "jest-it-up" // must run from the same directory as `jest.config.js`
}
}
within jest.config.js
:
module.exports = {
coverageReporters: [
'json-summary' // plus any other reporters, e.g. "lcov", "text", "text-summary"
],
coverageThreshold: {
global: {
branches: 0, // or your current numbers
functions: 0,
lines: 0,
statements: 0
}
}
}
Once tests finish running, jest-it-up will update configured thresholds to match higher coverage numbers, if any.
$ jest-it-up --help
Usage: jest-it-up [options]
Options:
-c, --config <path> path to a Jest config file (default: 'jest.config.js')
-m, --margin <margin> minimum threshold increase (default: 0)
-t, --tolerance <tolerance> threshold difference from actual coverage
-i, --interactive ask for confirmation before applying changes
-s, --silent do not output messages
-d, --dry-run process but do not change files
-v, --version output the version number
-p, --precision number of threshold decimal places to persist
-h, --help display help for command
FAQs
Automatically bump up global Jest thresholds whenever coverage goes above them
The npm package jest-it-up receives a total of 11,000 weekly downloads. As such, jest-it-up popularity was classified as popular.
We found that jest-it-up demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.