{"id":13769415,"url":"https://github.com/rbardini/jest-it-up","last_synced_at":"2025-04-07T07:13:22.526Z","repository":{"id":41985870,"uuid":"259963301","full_name":"rbardini/jest-it-up","owner":"rbardini","description":"🌐📈 Automatically bump up global Jest thresholds whenever coverage goes above them","archived":false,"fork":false,"pushed_at":"2024-08-26T23:39:51.000Z","size":2296,"stargazers_count":64,"open_issues_count":6,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T05:06:27.914Z","etag":null,"topics":["coverage","global","jest","test","testing","threshold"],"latest_commit_sha":null,"homepage":"https://npm.im/jest-it-up","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbardini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"rbardini","custom":["buymeacoffee.com/rbardini","paypal.me/rbardini"]}},"created_at":"2020-04-29T15:21:58.000Z","updated_at":"2025-02-11T21:57:18.000Z","dependencies_parsed_at":"2024-01-12T10:25:38.079Z","dependency_job_id":"7262e72f-426b-4e48-b547-07f5c0621bc1","html_url":"https://github.com/rbardini/jest-it-up","commit_stats":{"total_commits":19,"total_committers":5,"mean_commits":3.8,"dds":"0.21052631578947367","last_synced_commit":"66018e546b3044381462c2cabc41ea4a916d8dd5"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbardini%2Fjest-it-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbardini%2Fjest-it-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbardini%2Fjest-it-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbardini%2Fjest-it-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbardini","download_url":"https://codeload.github.com/rbardini/jest-it-up/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","global","jest","test","testing","threshold"],"created_at":"2024-08-03T17:00:24.255Z","updated_at":"2025-04-07T07:13:22.502Z","avatar_url":"https://github.com/rbardini.png","language":"JavaScript","funding_links":["https://ko-fi.com/rbardini","buymeacoffee.com/rbardini","paypal.me/rbardini"],"categories":["Packages"],"sub_categories":["Coverage"],"readme":"# jest-it-up\n\n[![npm package version](https://img.shields.io/npm/v/jest-it-up)](https://www.npmjs.com/package/jest-it-up)\n[![Build status](https://img.shields.io/github/actions/workflow/status/rbardini/jest-it-up/main.yml)](https://github.com/rbardini/jest-it-up/actions)\n[![Code coverage](https://img.shields.io/codecov/c/github/rbardini/jest-it-up.svg)](https://codecov.io/gh/rbardini/jest-it-up)\n[![Dependencies status](https://img.shields.io/librariesio/release/npm/jest-it-up)](https://libraries.io/npm/jest-it-up)\n\nEnsure incremental coverage gains are not lost, and positively reinforce good testing habits. Automatically bump up global Jest thresholds whenever coverage goes above them.\n\n![Demo](demo.gif)\n\n## Requirements\n\n- Node.js 20+\n- Conventional `jest.config.js` (`package.json` config unsupported)\n- `json-summary` coverage report (see [usage](#usage))\n\n## Installation\n\n```console\nnpm install --save-dev jest-it-up\n```\n\n## Usage\n\njest-it-up exposes a standalone CLI tool (see [options](#options)), but you most likely want to use it in a post-test script.\n\nWithin `package.json`:\n\n```js\n{\n  \"scripts\": {\n    \"test\": \"jest --coverage\", // or set `collectCoverage` to `true` in Jest config\n    \"posttest\": \"jest-it-up\" // must run from the same directory as `jest.config.js`\n  }\n}\n```\n\nwithin `jest.config.js`:\n\n```js\nmodule.exports = {\n  coverageReporters: [\n    'json-summary', // plus any other reporters, e.g. \"lcov\", \"text\", \"text-summary\"\n  ],\n  coverageThreshold: {\n    global: {\n      branches: 0, // or your current numbers\n      functions: 0,\n      lines: 0,\n      statements: 0,\n    },\n  },\n}\n```\n\nOnce tests finish running, jest-it-up will update configured thresholds to match higher coverage numbers, if any.\n\n## Options\n\n```console\n$ jest-it-up --help\nUsage: jest-it-up [options]\n\nOptions:\n  -c, --config \u003cpath\u003e          path to a Jest config file (default: 'jest.config.js')\n  -m, --margin \u003cmargin\u003e        minimum threshold increase (default: 0)\n  -t, --tolerance \u003ctolerance\u003e  threshold difference from actual coverage\n  -i, --interactive            ask for confirmation before applying changes\n  -s, --silent                 do not output messages\n  -d, --dry-run                process but do not change files\n  -v, --version                output the version number\n  -p, --precision              number of threshold decimal places to persist\n  -h, --help                   display help for command\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbardini%2Fjest-it-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbardini%2Fjest-it-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbardini%2Fjest-it-up/lists"}