{"id":15645945,"url":"https://github.com/ikatyang/jest-playback","last_synced_at":"2026-03-07T18:05:24.039Z","repository":{"id":22713167,"uuid":"97117368","full_name":"ikatyang/jest-playback","owner":"ikatyang","description":"Record and playback HTTP requests from your Jest tests","archived":false,"fork":false,"pushed_at":"2024-01-20T02:39:43.000Z","size":749,"stargazers_count":54,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T12:48:07.213Z","etag":null,"topics":["jest","playback","record","request"],"latest_commit_sha":null,"homepage":"","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/ikatyang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-13T11:55:24.000Z","updated_at":"2024-05-20T02:37:30.000Z","dependencies_parsed_at":"2023-01-13T22:08:28.742Z","dependency_job_id":"3ee2a92d-566d-49c7-bb8e-6df45b5593ce","html_url":"https://github.com/ikatyang/jest-playback","commit_stats":{"total_commits":369,"total_committers":7,"mean_commits":"52.714285714285715","dds":0.5582655826558265,"last_synced_commit":"1f423f991bd09372de3b013dc6bd746fb3ec5361"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ikatyang/jest-playback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fjest-playback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fjest-playback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fjest-playback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fjest-playback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikatyang","download_url":"https://codeload.github.com/ikatyang/jest-playback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fjest-playback/sbom","scorecard":{"id":483568,"data":{"date":"2025-08-11","repo":{"name":"github.com/ikatyang/jest-playback","commit":"60e4210201f05c5f506b712cc79e68308cd934a0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/21 approved changesets -- score normalized to 0","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"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/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ikatyang/jest-playback/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ikatyang/jest-playback/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ikatyang/jest-playback/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/ikatyang/jest-playback/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ikatyang/jest-playback/test.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: branch 'master' does not require approvers","Warn: codeowners review is not required on branch 'master'","Warn: no status checks found to merge onto 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-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm"],"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-19T17:14:17.675Z","repository_id":22713167,"created_at":"2025-08-19T17:14:17.675Z","updated_at":"2025-08-19T17:14:17.675Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30225512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T17:00:40.062Z","status":"ssl_error","status_checked_at":"2026-03-07T17:00:39.026Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["jest","playback","record","request"],"created_at":"2024-10-03T12:10:41.059Z","updated_at":"2026-03-07T18:05:24.017Z","avatar_url":"https://github.com/ikatyang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-playback\n\n[![npm](https://img.shields.io/npm/v/jest-playback.svg)](https://www.npmjs.com/package/jest-playback)\n[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/jest-playback/test.yml)](https://github.com/ikatyang/jest-playback/actions?query=branch%3Amaster)\n\nRecord and playback HTTP requests from your Jest tests\n\n[Changelog](https://github.com/ikatyang/jest-playback/blob/master/CHANGELOG.md)\n\n## Install\n\n```sh\nnpm install jest-playback\n```\n\n## Usage\n\n```js\nimport * as jestPlayback from 'jest-playback'\n\nawait jestPlayback.setup()\n\ntest('example', async () =\u003e {\n  const response = await fetch('http://www.example.com/')\n  expect(response.status).toBe(200)\n})\n```\n\nThe records are stored as snapshots.\n\n## API\n\n```ts\nexport default setup\nexport declare function setup(options?: Options): Promise\u003cvoid\u003e\n\nexport interface Options {\n  /** @default Mode.Auto */\n  mode?: Mode\n  getRequestCacheKey?: (request: Request) =\u003e string | Promise\u003cstring\u003e\n}\n\nexport enum Mode {\n  /**\n   * - `Mode.Update` if Jest `--update-snapshot` flag specified\n   * - `Mode.Play` if Jest `--ci` flag specified\n   * - `Mode.Record` otherwise\n   */\n  Auto = 'auto',\n  /**\n   * - all requests are recorded\n   */\n  Update = 'update',\n  /**\n   * - play records\n   * - new requests are blocked\n   */\n  Play = 'play',\n  /**\n   * - play records\n   * - new requests are recorded\n   */\n  Record = 'record',\n}\n```\n\n## Development\n\n```sh\n# lint\npnpm run lint\n\n# build\npnpm run build\n\n# test with jest\npnpm run test:jest\n\n# test with vitest\npnpm run test:vitest\n```\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikatyang%2Fjest-playback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikatyang%2Fjest-playback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikatyang%2Fjest-playback/lists"}