{"id":13374797,"url":"https://github.com/netflix/pollyjs","last_synced_at":"2026-10-18T22:23:02.902Z","repository":{"id":38876552,"uuid":"135633158","full_name":"Netflix/pollyjs","owner":"Netflix","description":"Record, Replay, and Stub HTTP Interactions.","archived":false,"fork":false,"pushed_at":"2025-05-31T22:29:19.000Z","size":3695,"stargazers_count":10248,"open_issues_count":61,"forks_count":356,"subscribers_count":365,"default_branch":"master","last_synced_at":"2026-10-16T01:10:39.909Z","etag":null,"topics":["browser","javascript","netflix","nodejs","record","replay","testing"],"latest_commit_sha":null,"homepage":"https://netflix.github.io/pollyjs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Netflix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2018-05-31T20:39:44.000Z","updated_at":"2026-10-15T17:57:23.000Z","dependencies_parsed_at":"2026-10-08T12:13:48.005Z","dependency_job_id":null,"html_url":"https://github.com/Netflix/pollyjs","commit_stats":{"total_commits":358,"total_committers":36,"mean_commits":9.944444444444445,"dds":0.3044692737430168,"last_synced_commit":"2d7f0f33d9f552e78f0dfe81179751b4692357be"},"previous_names":[],"tags_count":155,"template":false,"template_full_name":null,"purl":"pkg:github/Netflix/pollyjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fpollyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fpollyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fpollyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fpollyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Netflix","download_url":"https://codeload.github.com/Netflix/pollyjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fpollyjs/sbom","scorecard":{"id":100343,"data":{"date":"2025-08-11","repo":{"name":"github.com/Netflix/pollyjs","commit":"d031861625f58423169b396e5afc8a0110d1b232"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"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":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":1,"reason":"Found 5/30 approved changesets -- score normalized to 1","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":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 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":0,"reason":"152 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","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-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-wrw9-m778-g6mc","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-wxhq-pm8v-cw75","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-5h7x-68wj-jhwc","Warn: Project is vulnerable to: GHSA-p3vf-v8qc-cwcr","Warn: Project is vulnerable to: GHSA-gx9m-whjm-85jf","Warn: Project is vulnerable to: GHSA-mmhx-hmjr-r674","Warn: Project is vulnerable to: GHSA-vhxf-7vqr-mrjg","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-273r-mgr4-v34f","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-h726-x36v-rx45","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-pc58-wgmc-hfjr","Warn: Project is vulnerable to: GHSA-vvv8-xw5f-3f88","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-3949-f494-cm99","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-c2gp-86p4-5935","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-x6fg-f45m-jf5q","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-h9rv-jmmf-4pgx","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-rqff-837h-mm52","Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2","Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j","Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-15T09:59:48.586Z","repository_id":38876552,"created_at":"2025-08-15T09:59:48.586Z","updated_at":"2025-08-15T09:59:48.586Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38333850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"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":["browser","javascript","netflix","nodejs","record","replay","testing"],"created_at":"2024-07-30T05:01:18.052Z","updated_at":"2026-10-18T22:23:02.464Z","avatar_url":"https://github.com/Netflix.png","language":"JavaScript","funding_links":[],"categories":["\u003ca id=\"58b6684347a223e01d4d76d9ca185a88\"\u003e\u003c/a\u003eReplay\u0026\u0026重播"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Polly.JS\" width=\"400px\" src=\"https://netflix.github.io/pollyjs/assets/images/wordmark-logo-alt.png\" /\u003e\n\u003c/p\u003e\n\u003ch2 align=\"center\"\u003eRecord, Replay, and Stub HTTP Interactions\u003c/h2\u003e\n\n[![Build Status](https://travis-ci.com/Netflix/pollyjs.svg?branch=master)](https://travis-ci.com/Netflix/pollyjs)\n[![license](https://img.shields.io/github/license/Netflix/pollyjs.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nPolly.JS is a standalone, framework-agnostic JavaScript library that enables recording, replaying, and stubbing of HTTP interactions. By tapping into multiple request APIs across both Node \u0026 the browser, Polly.JS is able to mock requests and responses with little to no configuration while giving you the ability to take full control of each request with a simple, powerful, and intuitive API.\n\n\u003e Interested in contributing or just seeing Polly in action? Head over to [CONTRIBUTING.md](CONTRIBUTING.md) to learn how to spin up the project!\n\n## Why Polly?\n\nKeeping fixtures and factories in parity with your APIs can be a time consuming process.\nPolly alleviates this process by recording and maintaining actual server responses while also staying flexible.\n\n- Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.\n- Use Polly's client-side server to modify or intercept requests and responses to simulate different application states (e.g. loading, error, etc.).\n\n## Features\n\n- 🚀 Node \u0026 Browser Support\n- ⚡️️ Simple, Powerful, \u0026 Intuitive API\n- 💎 First Class Mocha \u0026 QUnit Test Helpers\n- 🔥 Intercept, Pass-Through, and Attach Events\n- 📼 Record to Disk or Local Storage\n- ⏱ Slow Down or Speed Up Time\n\n## Getting Started\n\nCheck out the [Quick Start](https://netflix.github.io/pollyjs/#/quick-start) documentation to get started.\n\n## Usage\n\nLet's take a look at what an example test case would look like using Polly.\n\n```js\nimport { Polly } from '@pollyjs/core';\nimport XHRAdapter from '@pollyjs/adapter-xhr';\nimport FetchAdapter from '@pollyjs/adapter-fetch';\nimport RESTPersister from '@pollyjs/persister-rest';\n\n/*\n  Register the adapters and persisters we want to use. This way all future\n  polly instances can access them by name.\n*/\nPolly.register(XHRAdapter);\nPolly.register(FetchAdapter);\nPolly.register(RESTPersister);\n\ndescribe('Netflix Homepage', function () {\n  it('should be able to sign in', async function () {\n    /*\n      Create a new polly instance.\n\n      Connect Polly to both fetch and XHR browser APIs. By default, it will\n      record any requests that it hasn't yet seen while replaying ones it\n      has already recorded.\n    */\n    const polly = new Polly('Sign In', {\n      adapters: ['xhr', 'fetch'],\n      persister: 'rest'\n    });\n    const { server } = polly;\n\n    /* Intercept all Google Analytic requests and respond with a 200 */\n    server\n      .get('/google-analytics/*path')\n      .intercept((req, res) =\u003e res.sendStatus(200));\n\n    /* Pass-through all GET requests to /coverage */\n    server.get('/coverage').passthrough();\n\n    /* start: pseudo test code */\n    await visit('/login');\n    await fillIn('email', 'polly@netflix.com');\n    await fillIn('password', '@pollyjs');\n    await submit();\n    /* end: pseudo test code */\n\n    expect(location.pathname).to.equal('/browse');\n\n    /*\n      Calling `stop` will persist requests as well as disconnect from any\n      connected browser APIs (e.g. fetch or XHR).\n    */\n    await polly.stop();\n  });\n});\n```\n\nThe above test case would generate the following [HAR](http://www.softwareishard.com/blog/har-12-spec/)\nfile which Polly will use to replay the sign-in response when the test is rerun:\n\n```json\n{\n  \"log\": {\n    \"_recordingName\": \"Sign In\",\n    \"browser\": {\n      \"name\": \"Chrome\",\n      \"version\": \"67.0\"\n    },\n    \"creator\": {\n      \"name\": \"Polly.JS\",\n      \"version\": \"0.5.0\",\n      \"comment\": \"persister:rest\"\n    },\n    \"entries\": [\n      {\n        \"_id\": \"06f06e6d125cbb80896c41786f9a696a\",\n        \"_order\": 0,\n        \"cache\": {},\n        \"request\": {\n          \"bodySize\": 51,\n          \"cookies\": [],\n          \"headers\": [\n            {\n              \"name\": \"content-type\",\n              \"value\": \"application/json; charset=utf-8\"\n            }\n          ],\n          \"headersSize\": 97,\n          \"httpVersion\": \"HTTP/1.1\",\n          \"method\": \"POST\",\n          \"postData\": {\n            \"mimeType\": \"application/json; charset=utf-8\",\n            \"text\": \"{\\\"email\\\":\\\"polly@netflix.com\\\",\\\"password\\\":\\\"@pollyjs\\\"}\"\n          },\n          \"queryString\": [],\n          \"url\": \"https://netflix.com/api/v1/login\"\n        },\n        \"response\": {\n          \"bodySize\": 0,\n          \"content\": {\n            \"mimeType\": \"text/plain; charset=utf-8\",\n            \"size\": 0\n          },\n          \"cookies\": [],\n          \"headers\": [],\n          \"headersSize\": 0,\n          \"httpVersion\": \"HTTP/1.1\",\n          \"redirectURL\": \"\",\n          \"status\": 200,\n          \"statusText\": \"OK\"\n        },\n        \"startedDateTime\": \"2018-06-29T17:31:55.348Z\",\n        \"time\": 11,\n        \"timings\": {\n          \"blocked\": -1,\n          \"connect\": -1,\n          \"dns\": -1,\n          \"receive\": 0,\n          \"send\": 0,\n          \"ssl\": -1,\n          \"wait\": 11\n        }\n      }\n    ],\n    \"pages\": [],\n    \"version\": \"1.2\"\n  }\n}\n```\n\n## Prior Art\n\nThe \"Client Server\" API of Polly is heavily influenced by the very popular mock server library [pretender](https://github.com/pretenderjs/pretender). Pretender supports XHR and Fetch stubbing and is a great lightweight alternative to Polly if your project does not require persisting capabilities or Node adapters.\n\nThank you to all contributors especially the maintainers: [trek](https://github.com/trek), [stefanpenner](https://github.com/stefanpenner), and [xg-wang](https://github.com/xg-wang).\n\n## Contributors\n\n[//]: contributor-faces\n\n\u003ca href=\"https://github.com/offirgolan\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/575938?v=4\" title=\"offirgolan\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/jasonmit\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3108309?v=4\" title=\"jasonmit\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/cibernox\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/265339?v=4\" title=\"cibernox\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/DenrizSusam\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/39295979?v=4\" title=\"DenrizSusam\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/dustinsoftware\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/942358?v=4\" title=\"dustinsoftware\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/silverchen\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6683103?v=4\" title=\"silverchen\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/tombh\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/160835?v=4\" title=\"tombh\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/zkwentz\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4832?v=4\" title=\"zkwentz\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/agraves\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/46964?v=4\" title=\"agraves\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/brandon-leapyear\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/27799541?v=4\" title=\"brandon-leapyear\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/swashcap\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1858316?v=4\" title=\"swashcap\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/justsml\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/397632?v=4\" title=\"justsml\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/DanielRuf\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/827205?v=4\" title=\"DanielRuf\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/dciccale\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/539546?v=4\" title=\"dciccale\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ericclemmons\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/15182?v=4\" title=\"ericclemmons\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/jamesgeorge007\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/25279263?v=4\" title=\"jamesgeorge007\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/woodenconsulting\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4163029?v=4\" title=\"woodenconsulting\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/feinoujc\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1733707?v=4\" title=\"feinoujc\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/josex2r\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3719730?v=4\" title=\"josex2r\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/jomaxx\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2747424?v=4\" title=\"jomaxx\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/karlhorky\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1935696?v=4\" title=\"karlhorky\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/kennethlarsen\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1408595?v=4\" title=\"kennethlarsen\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/poteto\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1390709?v=4\" title=\"poteto\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/fastfrwrd\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/231133?v=4\" title=\"fastfrwrd\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/rwd\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/218337?v=4\" title=\"rwd\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/rmachielse\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2470404?v=4\" title=\"rmachielse\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ROpdebee\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/15186467?v=4\" title=\"ROpdebee\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/gribnoysup\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5036933?v=4\" title=\"gribnoysup\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/shriyash\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4494915?v=4\" title=\"shriyash\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\n[//]: contributor-faces\n\n## License\n\nCopyright (c) 2018 Netflix, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetflix%2Fpollyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetflix%2Fpollyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetflix%2Fpollyjs/lists"}