{"id":19556330,"url":"https://github.com/fiverr/react-fetch-mock-provider","last_synced_at":"2026-02-14T12:36:39.533Z","repository":{"id":141855357,"uuid":"159463988","full_name":"fiverr/react-fetch-mock-provider","owner":"fiverr","description":"Mock HTTP requests made using fetch from your React component","archived":false,"fork":false,"pushed_at":"2023-03-21T22:47:28.000Z","size":7,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-10-04T17:51:10.343Z","etag":null,"topics":["fetch","http","mock","react"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@fiverr/react-fetch-mock-provider","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fiverr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-11-28T07:49:23.000Z","updated_at":"2020-09-19T04:15:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4839d16a-4e42-4a8c-816b-d4feea7e9304","html_url":"https://github.com/fiverr/react-fetch-mock-provider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fiverr/react-fetch-mock-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Freact-fetch-mock-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Freact-fetch-mock-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Freact-fetch-mock-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Freact-fetch-mock-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiverr","download_url":"https://codeload.github.com/fiverr/react-fetch-mock-provider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiverr%2Freact-fetch-mock-provider/sbom","scorecard":{"id":401778,"data":{"date":"2025-08-11","repo":{"name":"github.com/fiverr/react-fetch-mock-provider","commit":"e58ae76c1c0160541594072691ba78032ce3b522"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":2,"reason":"Found 2/7 approved changesets -- score normalized to 2","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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":1,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Warn: 'force pushes' enabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: branch 'master' does not require approvers","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on 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 2 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"}}]},"last_synced_at":"2025-08-18T20:14:23.912Z","repository_id":141855357,"created_at":"2025-08-18T20:14:23.912Z","updated_at":"2025-08-18T20:14:23.912Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"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":["fetch","http","mock","react"],"created_at":"2024-11-11T04:37:35.271Z","updated_at":"2026-02-14T12:36:39.516Z","avatar_url":"https://github.com/fiverr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-fetch-mock-provider\n\nA \"Reactified\" wrapper around [`fetch-mock`](https://github.com/wheresrhys/fetch-mock), that provides a more React-friendly interface.\n\nThis component allows you to easily mock HTTP requests made with `fetch`.\n\n## Installation\n\n```\nnpm install -D @fiverr/react-fetch-mock-provider\n```\n\n## Usage\n\n### Basic mocking\n\n```js\nimport FetchMockProvider from '@fiverr/react-fetch-mock-provider';\n\n\u003cFetchMockProvider mocks={[{\n    request: {\n        url: /users/,\n        method: 'GET'\n    },\n    response: {\n        body: {\n            users: {\n                1: {id: 1, name: 'one'},\n                2: {id: 2, name: 'two'},\n                3: {id: 3, name: 'three'},\n                4: {id: 4, name: 'four'},\n                5: {id: 5, name: 'five'},\n            }\n        },\n        status: 200\n    }}]}\u003e\n    \u003cUsers/\u003e\n\u003c/FetchMockProvider\u003e\n```\n\n### Using a Function for `response`\n\nSame as in `fetch-mock`, the `response` prop can be a function.\n\nSee the full documentation [here](http://www.wheresrhys.co.uk/fetch-mock/#api-mockingmock_response).\n\n```js\nimport FetchMockProvider from '@fiverr/react-fetch-mock-provider';\n\n\u003cFetchMockProvider mocks={[{\n    request: {\n        url: /users/,\n        method: 'GET'\n    },\n    response: (request, payload) =\u003e {\n        const status = payload.body.someRequiredParameter ? 200 : 500;\n\n        return {\n            body: {},\n            status\n        };\n    }}]}\u003e\n    \u003cUsers/\u003e\n\u003c/FetchMockProvider\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiverr%2Freact-fetch-mock-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiverr%2Freact-fetch-mock-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiverr%2Freact-fetch-mock-provider/lists"}