[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10146":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},10146,"pollyjs","Netflix\u002Fpollyjs","Netflix","Record, Replay, and Stub HTTP Interactions.","https:\u002F\u002Fnetflix.github.io\u002Fpollyjs",null,"JavaScript",10254,353,365,43,0,3,11,70.25,"Apache License 2.0",false,"master",true,[25,26,27,28,29,30,31],"browser","javascript","netflix","nodejs","record","replay","testing","2026-06-12 04:00:48","\u003Cp align=\"center\">\n  \u003Cimg alt=\"Polly.JS\" width=\"400px\" src=\"https:\u002F\u002Fnetflix.github.io\u002Fpollyjs\u002Fassets\u002Fimages\u002Fwordmark-logo-alt.png\" \u002F>\n\u003C\u002Fp>\n\u003Ch2 align=\"center\">Record, Replay, and Stub HTTP Interactions\u003C\u002Fh2>\n\n[![Build Status](https:\u002F\u002Ftravis-ci.com\u002FNetflix\u002Fpollyjs.svg?branch=master)](https:\u002F\u002Ftravis-ci.com\u002FNetflix\u002Fpollyjs)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FNetflix\u002Fpollyjs.svg)](http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-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 & 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> 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 & Browser Support\n- ⚡️️ Simple, Powerful, & Intuitive API\n- 💎 First Class Mocha & 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:\u002F\u002Fnetflix.github.io\u002Fpollyjs\u002F#\u002Fquick-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\u002Fcore';\nimport XHRAdapter from '@pollyjs\u002Fadapter-xhr';\nimport FetchAdapter from '@pollyjs\u002Fadapter-fetch';\nimport RESTPersister from '@pollyjs\u002Fpersister-rest';\n\n\u002F*\n  Register the adapters and persisters we want to use. This way all future\n  polly instances can access them by name.\n*\u002F\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    \u002F*\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    *\u002F\n    const polly = new Polly('Sign In', {\n      adapters: ['xhr', 'fetch'],\n      persister: 'rest'\n    });\n    const { server } = polly;\n\n    \u002F* Intercept all Google Analytic requests and respond with a 200 *\u002F\n    server\n      .get('\u002Fgoogle-analytics\u002F*path')\n      .intercept((req, res) => res.sendStatus(200));\n\n    \u002F* Pass-through all GET requests to \u002Fcoverage *\u002F\n    server.get('\u002Fcoverage').passthrough();\n\n    \u002F* start: pseudo test code *\u002F\n    await visit('\u002Flogin');\n    await fillIn('email', 'polly@netflix.com');\n    await fillIn('password', '@pollyjs');\n    await submit();\n    \u002F* end: pseudo test code *\u002F\n\n    expect(location.pathname).to.equal('\u002Fbrowse');\n\n    \u002F*\n      Calling `stop` will persist requests as well as disconnect from any\n      connected browser APIs (e.g. fetch or XHR).\n    *\u002F\n    await polly.stop();\n  });\n});\n```\n\nThe above test case would generate the following [HAR](http:\u002F\u002Fwww.softwareishard.com\u002Fblog\u002Fhar-12-spec\u002F)\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\u002Fjson; charset=utf-8\"\n            }\n          ],\n          \"headersSize\": 97,\n          \"httpVersion\": \"HTTP\u002F1.1\",\n          \"method\": \"POST\",\n          \"postData\": {\n            \"mimeType\": \"application\u002Fjson; charset=utf-8\",\n            \"text\": \"{\\\"email\\\":\\\"polly@netflix.com\\\",\\\"password\\\":\\\"@pollyjs\\\"}\"\n          },\n          \"queryString\": [],\n          \"url\": \"https:\u002F\u002Fnetflix.com\u002Fapi\u002Fv1\u002Flogin\"\n        },\n        \"response\": {\n          \"bodySize\": 0,\n          \"content\": {\n            \"mimeType\": \"text\u002Fplain; charset=utf-8\",\n            \"size\": 0\n          },\n          \"cookies\": [],\n          \"headers\": [],\n          \"headersSize\": 0,\n          \"httpVersion\": \"HTTP\u002F1.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:\u002F\u002Fgithub.com\u002Fpretenderjs\u002Fpretender). 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:\u002F\u002Fgithub.com\u002Ftrek), [stefanpenner](https:\u002F\u002Fgithub.com\u002Fstefanpenner), and [xg-wang](https:\u002F\u002Fgithub.com\u002Fxg-wang).\n\n## Contributors\n\n[\u002F\u002F]: contributor-faces\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Foffirgolan\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F575938?v=4\" title=\"offirgolan\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjasonmit\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3108309?v=4\" title=\"jasonmit\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcibernox\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F265339?v=4\" title=\"cibernox\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FDenrizSusam\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39295979?v=4\" title=\"DenrizSusam\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdustinsoftware\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F942358?v=4\" title=\"dustinsoftware\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsilverchen\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6683103?v=4\" title=\"silverchen\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftombh\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160835?v=4\" title=\"tombh\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzkwentz\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4832?v=4\" title=\"zkwentz\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fagraves\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F46964?v=4\" title=\"agraves\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbrandon-leapyear\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F27799541?v=4\" title=\"brandon-leapyear\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fswashcap\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1858316?v=4\" title=\"swashcap\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjustsml\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F397632?v=4\" title=\"justsml\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FDanielRuf\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F827205?v=4\" title=\"DanielRuf\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdciccale\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F539546?v=4\" title=\"dciccale\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fericclemmons\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15182?v=4\" title=\"ericclemmons\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjamesgeorge007\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25279263?v=4\" title=\"jamesgeorge007\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwoodenconsulting\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4163029?v=4\" title=\"woodenconsulting\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffeinoujc\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1733707?v=4\" title=\"feinoujc\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjosex2r\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3719730?v=4\" title=\"josex2r\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjomaxx\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2747424?v=4\" title=\"jomaxx\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkarlhorky\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1935696?v=4\" title=\"karlhorky\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkennethlarsen\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1408595?v=4\" title=\"kennethlarsen\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpoteto\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1390709?v=4\" title=\"poteto\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffastfrwrd\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F231133?v=4\" title=\"fastfrwrd\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Frwd\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F218337?v=4\" title=\"rwd\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Frmachielse\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2470404?v=4\" title=\"rmachielse\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FROpdebee\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15186467?v=4\" title=\"ROpdebee\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgribnoysup\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5036933?v=4\" title=\"gribnoysup\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fshriyash\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4494915?v=4\" title=\"shriyash\" width=\"80\" height=\"80\">\u003C\u002Fa>\n\n[\u002F\u002F]: 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:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0](http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-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","Polly.JS 是一个独立的、与框架无关的JavaScript库，用于记录、重放和模拟HTTP交互。它通过接入Node和浏览器中的多种请求API，能够以极少的配置来模拟请求和响应，并提供简单、强大且直观的API让用户完全控制每个请求。该工具特别适合于需要保持测试套件与实际API一致性的场景，如自动化测试环境下的快速、确定性测试或模拟不同应用状态（例如加载中、错误等）。Polly.JS 支持Node.js和浏览器环境，具备录制到磁盘或本地存储的功能，并允许用户调整请求的时间特性。",2,"2026-06-11 03:26:50","top_topic"]