{"id":16526828,"url":"https://github.com/silverbucket/threshold","last_synced_at":"2026-06-06T04:31:46.321Z","repository":{"id":255162970,"uuid":"848728811","full_name":"silverbucket/threshold","owner":"silverbucket","description":"A simple Deno tool which parses the output of `deno coverage` for a minimum coverage threshold","archived":false,"fork":false,"pushed_at":"2024-08-28T11:50:12.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T16:16:56.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/silverbucket.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}},"created_at":"2024-08-28T09:49:51.000Z","updated_at":"2024-08-28T11:50:15.000Z","dependencies_parsed_at":"2024-08-28T11:28:36.060Z","dependency_job_id":"a9d63854-d2ea-4713-9581-e30e2861a43d","html_url":"https://github.com/silverbucket/threshold","commit_stats":null,"previous_names":["silverbucket/threshold"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverbucket%2Fthreshold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverbucket%2Fthreshold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverbucket%2Fthreshold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverbucket%2Fthreshold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverbucket","download_url":"https://codeload.github.com/silverbucket/threshold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241610978,"owners_count":19990505,"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":[],"created_at":"2024-10-11T17:30:16.328Z","updated_at":"2025-03-03T04:44:44.788Z","avatar_url":"https://github.com/silverbucket.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @silverbucket/threshold\n\nA simple Deno tool which parses the output of `deno coverage` to check for a minimum coverage threshold\n\n# About\n\nThis is intended as a dead-simple check for a basic minimum threshold of test code coverage. It's a stop-gap until deno\nimplements some for of defining thresholds natively during a `deno coverage` run.\n\nIt parses the output of `deno coverage`, and only checks the `All files` line, for `branch` and `line` coverage, \nensuring they meet a minimum threshold.\n\n# Usage\n\n## CLI\n\nFirst, you should run tests and generate a coverage report. Then you can run the `deno coverage` command and pipe the\noutput to this script, with optional values for `branch` and `threshold` (defaults to 85 for both).\n\n```bash\ndeno test --coverage\ndeno coverage | deno run jsr:@silverbucket/threshold 90 92\n```\n\nIn this case the threshold for `branch` is `90%` and the threshold for `line` is `91%`\n\n## Module\n\nYou can optionally import the `Threshold` class in your program.\n\n```ts\nimport Threshold from \"jsr:@silverbucket/threshold\";\n\nconst thres = new Threshold(90, 92);\n// get deno converage output\nconst errors = thres.processInput(deno_coverage);\nif (errors.length) {\n    // report errors\n}\n```\n\n# Author\n\nNick Jennings \u003cnick@silverbucket.net\u003e\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverbucket%2Fthreshold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverbucket%2Fthreshold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverbucket%2Fthreshold/lists"}