{"id":46419121,"url":"https://github.com/florpor/puppeteer-mock","last_synced_at":"2026-03-05T15:03:20.438Z","repository":{"id":57332060,"uuid":"335211128","full_name":"florpor/puppeteer-mock","owner":"florpor","description":"Build a bridge between Puppeteer and your favourite HTTP mocking library","archived":false,"fork":false,"pushed_at":"2021-02-03T08:30:26.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T13:43:06.501Z","etag":null,"topics":["http","https","mock","mocking","puppeteer","test","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/florpor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-02T07:57:08.000Z","updated_at":"2021-02-03T08:30:28.000Z","dependencies_parsed_at":"2022-09-21T03:52:07.788Z","dependency_job_id":null,"html_url":"https://github.com/florpor/puppeteer-mock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/florpor/puppeteer-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florpor%2Fpuppeteer-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florpor%2Fpuppeteer-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florpor%2Fpuppeteer-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florpor%2Fpuppeteer-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florpor","download_url":"https://codeload.github.com/florpor/puppeteer-mock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florpor%2Fpuppeteer-mock/sbom","scorecard":{"id":404117,"data":{"date":"2025-08-11","repo":{"name":"github.com/florpor/puppeteer-mock","commit":"07c20cbc2e92bc8fed6f189d114f6f2ac26d7657"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"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":"Code-Review","score":0,"reason":"Found 0/8 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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/florpor/puppeteer-mock/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/florpor/puppeteer-mock/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/florpor/puppeteer-mock/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:41","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["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":"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":"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: MIT 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 'main'"],"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":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-18T20:46:46.311Z","repository_id":57332060,"created_at":"2025-08-18T20:46:46.312Z","updated_at":"2025-08-18T20:46:46.312Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30132585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T14:41:47.141Z","status":"ssl_error","status_checked_at":"2026-03-05T14:41:21.567Z","response_time":93,"last_error":"SSL_read: 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":["http","https","mock","mocking","puppeteer","test","testing"],"created_at":"2026-03-05T15:03:16.811Z","updated_at":"2026-03-05T15:03:20.430Z","avatar_url":"https://github.com/florpor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppeteer-mock\n\n[![npm](https://img.shields.io/npm/v/puppeteer-mock.svg)][npmjs]\n\n[npmjs]: https://www.npmjs.com/package/puppeteer-mock\n\nBuild a bridge between Puppeteer and your favourite HTTP mocking library\n\npuppeteer-mock makes the testing of Puppeteer-backed code easy by enabling the mocking of page responses which arrive at the headless browser.\n\npuppeteer-mock should work with any library which mocks Node.js's http/https module responses and is not dependent on a specific mocking library.\n\n## Installation\n\n```bash\n$ npm install --save-dev puppeteer-mock\n```\n\n## Usage\n\nYou can enable puppeteer-mock simply by calling its activate function:\n\n```js\nconst puppeteerMock = require('puppeteer-mock');\n\npuppeteerMock.activate();\n```\n\n**NOTE:** puppeteer-mock does not do the actual HTTP response mocking. You will need to use some library such as [nock](https://github.com/nock/nock) for that. What puppeteer-mock does is the routing of Puppeteer requests through Node.js's http/https modules so that the responses can be mocked using any supported HTTP mocking library.\n\nA recommended way to use puppeteer-mock is to activate it in your tests' setup hook and deactivate it in your teardown hook:\n\n```js\nconst puppeteerMock = require('puppeteer-mock');\n\ndescribe('test suite', function() {\n    beforeEach(function () {\n        // activate puppeteer-mock\n        if (!puppeteerMock.isActive())\n            puppeteerMock.activate();\n    }); \n\n    afterEach(function() {\n        // restore puppeteer requests\n        puppeteerMock.deactivate();\n    });\n\n    it('some test', function() {\n        // test code goes here\n    });\n});\n```\n\n## API\n\n**puppeteerMock.activate()**\n\nActivate puppeteer-mock to route Puppeteer requests through the library.\n\n**puppeteerMock.deactivate()**\n\nDeactivate puppeteer-mock and have Puppeteer requests routed normally.\n\n**puppeteerMock.isActive()**\n\nCheck if puppeteer-mock is currently active.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorpor%2Fpuppeteer-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorpor%2Fpuppeteer-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorpor%2Fpuppeteer-mock/lists"}