{"id":18668293,"url":"https://github.com/markis/jest-ratchet","last_synced_at":"2025-04-12T00:23:25.679Z","repository":{"id":28240872,"uuid":"117386375","full_name":"markis/jest-ratchet","owner":"markis","description":"🔧 Ratchet up test coverage","archived":false,"fork":false,"pushed_at":"2023-01-06T02:49:05.000Z","size":509,"stargazers_count":10,"open_issues_count":21,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T20:11:12.400Z","etag":null,"topics":["code-coverage","jest","jest-reporter","test-coverage","testing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/jest-ratchet","language":"TypeScript","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/markis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-13T23:22:15.000Z","updated_at":"2023-09-01T03:22:42.000Z","dependencies_parsed_at":"2023-01-14T08:26:06.401Z","dependency_job_id":null,"html_url":"https://github.com/markis/jest-ratchet","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fjest-ratchet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fjest-ratchet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fjest-ratchet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fjest-ratchet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markis","download_url":"https://codeload.github.com/markis/jest-ratchet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248498514,"owners_count":21114133,"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":["code-coverage","jest","jest-reporter","test-coverage","testing"],"created_at":"2024-11-07T08:42:10.930Z","updated_at":"2025-04-12T00:23:25.651Z","avatar_url":"https://github.com/markis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jest-Ratchet\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/dcf0bf468746ec3dc221/maintainability)](https://codeclimate.com/github/markis/jest-ratchet/maintainability)\n[![Build Status](https://travis-ci.org/markis/jest-ratchet.svg?branch=master)](https://travis-ci.org/markis/jest-ratchet)\n[![Coverage Status](https://coveralls.io/repos/github/markis/jest-ratchet/badge.svg?branch=master)](https://coveralls.io/github/markis/jest-ratchet?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/markis/jest-ratchet/badge.svg?targetFile=package.json)](https://snyk.io/test/github/markis/jest-ratchet?targetFile=package.json)\n\n\nRatchet up code coverage - keep test coverage going only one direction -- up\n\nJest-Ratchet is a coverage watcher for Jest. Everytime a new level of coverage is reached Jest-Ratchet will automatically update the coverageThreshold.\n\n### Installation\n\nnpm\n\n```bash\nnpm install jest-ratchet --dev\n```\n\nyarn\n\n```bash\nyarn add jest-ratchet --dev\n```\n\n### Jest Settings\n\nAdd `jest-ratchet` to the `reporters` section. And also ensure that `collectCoverage` is enabled and `json-summary` is added to the `coverageReporters`.\n\n```json\n{\n  \"collectCoverage\": true,\n  \"coverageReporters\": [\"json\", \"lcov\", \"text\", \"clover\", \"json-summary\"],\n  \"reporters\": [\"default\", \"jest-ratchet\"]\n}\n```\n\n### Optional Settings\n\nBy default, Jest-Ratchet is aggressive with updating coverage thresholds. Every time your coverage ticks up by 0.01%, the coverageThreshold is updated. There are a couple of options dampen this behavior.\n\n- tolerance (number): keeps the threshold below the measured coverage, allowing wiggle room. default: 0 tolerance\n- roundDown (boolean): round down to the nearest integer. default: false\n- timeout (number): the number of milliseconds to wait for to the Jest coverage json summary. default: wait indefinitely\n\nHere's how to pass configuration to Jest-Ratchet, per the [Jest documentation](https://jestjs.io/docs/en/configuration.html#reporters-array-modulename-modulename-options)\n\n```json\n{\n  \"collectCoverage\": true,\n  \"coverageReporters\": [\"json\", \"lcov\", \"text\", \"clover\", \"json-summary\"],\n  \"reporters\": [\n    \"default\",\n    [\n      \"jest-ratchet\",\n      { \"tolerance\": 2, \"roundDown\": true, \"timeout\": 5000 }\n    ]\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkis%2Fjest-ratchet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkis%2Fjest-ratchet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkis%2Fjest-ratchet/lists"}