{"id":19230298,"url":"https://github.com/mrloop/qunit-retry","last_synced_at":"2025-10-10T09:02:41.031Z","repository":{"id":51987614,"uuid":"169866569","full_name":"mrloop/qunit-retry","owner":"mrloop","description":"Drop in replacement for qunit `test` which retries a failed test.","archived":false,"fork":false,"pushed_at":"2025-01-28T13:32:56.000Z","size":421,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T04:28:59.778Z","etag":null,"topics":["qunit","retries","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrloop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2019-02-09T12:50:50.000Z","updated_at":"2025-01-28T13:33:01.000Z","dependencies_parsed_at":"2025-04-21T03:41:03.623Z","dependency_job_id":"d69122ea-aad7-4798-b9a7-931ab76e1b52","html_url":"https://github.com/mrloop/qunit-retry","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mrloop/qunit-retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrloop%2Fqunit-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrloop%2Fqunit-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrloop%2Fqunit-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrloop%2Fqunit-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrloop","download_url":"https://codeload.github.com/mrloop/qunit-retry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrloop%2Fqunit-retry/sbom","scorecard":{"id":664320,"data":{"date":"2025-08-11","repo":{"name":"github.com/mrloop/qunit-retry","commit":"15083b2f714ecd582825d062a694ba8242676785"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":4,"reason":"Found 6/13 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/mrloop/qunit-retry/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/mrloop/qunit-retry/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/mrloop/qunit-retry/ci.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: ISC License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-x4c5-c7rf-jjgv","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T17:25:19.810Z","repository_id":51987614,"created_at":"2025-08-21T17:25:19.810Z","updated_at":"2025-08-21T17:25:19.810Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003336,"owners_count":26083579,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["qunit","retries","testing"],"created_at":"2024-11-09T15:37:41.583Z","updated_at":"2025-10-10T09:02:41.001Z","avatar_url":"https://github.com/mrloop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"qunit-retry\n==============================================================================\n\n[![Latest NPM release][npm-badge]][npm-badge-url]\n![GitHub branch check runs](https://img.shields.io/github/check-runs/mrloop/qunit-retry/master?logo=github\u0026label=CI)\n\n[npm-badge]: https://img.shields.io/npm/v/qunit-retry.svg\n[npm-badge-url]: https://www.npmjs.com/package/qunit-retry\n\nDrop in replacement for [QUnit](https://qunitjs.com/) [test](https://api.qunitjs.com/QUnit/test) to `retry` test upon failure.\n\n```js\nimport setup from \"qunit-retry\";\nimport QUnit from \"qunit\";\n\nconst retry = setup(QUnit.test);\n// retry this test on failure as third party service occasionally fails\n// we need to test against third party service\n// we can live with occasional third party service failure\nretry(\"a test relying on 3rd party service that occasionally fails\", async function(assert) {\n  var result = await occasionallyFailingServiceTestResult();\n  assert.equal(result, 42);\n});\n```\n\nIt provides the same API as `QUnit.test`, including `test.each`, `test.only` etc. The only difference is that the test will be retried upon failure.\n\nUse very sparingly, for a suite of 2024 tests, using this for a single acceptance test.\n\nBlog post about `qunit-retry` available [here](https://blog.mrloop.com/javascript/2019/02/26/qunit-retry.html).\n\n### Set Max Runs\n\nThe default maximum number of retries is 2 (one attempt and one retry). To change it globally, pass the `maxRuns` option to the `setup` function:\n\n```js\nimport setup from \"qunit-retry\";\nimport QUnit from \"qunit\";\n\nconst retry = setup(QUnit.test, { maxRuns: 3 });\n```\n\nTo change it for a single test, pass the number of retries as the third argument:\n\n```js\n// retry this test **two times** (in addition to one initial attempt)\n// on failure as third party service occasionally fails\n// we need to test against third party service\n// we can live with occasional third party service failure\nretry(\"a test relying on 3rd party service that occasionally fails\", async function(assert) {\n  var result = await occasionallyFailingServiceTestResult();\n  assert.equal(result, 42);\n}, 3);\n```\n\n**Note:** It is generally advised to use the retry sparingly and this advice extends to setting a large number of retries.\n\n### Resetting environment between retries\n\nIf you need to reset the environment between retries, you can pass a `beforeRetry` function to the `setup` function:\n\n```js\nimport setup from \"qunit-retry\";\nimport QUnit from \"qunit\";\n\nconst retry = setup(QUnit.test, { beforeRetry: () =\u003e resetEnvironment() });\n```\n\nInstall\n------------------------------------------------------------------------------\n\n### npm\n\n```bash\nnpm install --save-dev qunit-retry\n```\n\nor using [`yarn`](https://yarnpkg.com/):\n\n```bash\nyarn add --dev qunit-retry\n```\n\nor using [`pnpm`](https://pnpm.js.org/):\n\n```bash\npnpm add --save-dev qunit-retry\n```\n\n\n### Node\n\n```js\nimport setup from \"qunit-retry\";\nimport QUnit from \"qunit\";\n\nconst retry = setup(QUnit.test);\n```\n\n### Directly in browser\n\n```html\n\u003cscript src=\"//code.jquery.com/qunit/qunit-2.9.3.js\"\u003e\u003c/script\u003e\n\n\u003cscript type=\"module\"\u003e\n  import setup from 'https://unpkg.com/qunit-retry/main.js'\n\n  const retry = setup(QUnit.test)\n\n  retry(\"a test relying on 3rd party service that occasionally fails\", async function(assert) {\n    var result = await occasionallyFailingServiceTestResult();\n    assert.equal(result, 42);\n  });\n\u003c/script\u003e\n```\n\nContributing\n------------------------------------------------------------------------------\n\n### How to Run Tests\n\n```bash\npnpm test\n```\n\n### How to Run Linting\n\n```bash\npnpm lint\n```\n\nLicense\n------------------------------------------------------------------------------\n\nqunit-retry is developed by and \u0026copy;\n[mrloop](http://mrloop.com) and contributors. It is released under the\n[ISC License](https://github.com/mrloop/qunit-retry/blob/master/LICENSE.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrloop%2Fqunit-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrloop%2Fqunit-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrloop%2Fqunit-retry/lists"}