{"id":21622654,"url":"https://github.com/midoahmed/mock-api-explorer","last_synced_at":"2025-07-09T01:34:37.756Z","repository":{"id":181987901,"uuid":"667391654","full_name":"MidoAhmed/mock-api-explorer","owner":"MidoAhmed","description":"Benchmark of different mocking REST APIs tools  for front-end development and testing","archived":false,"fork":false,"pushed_at":"2023-07-22T21:29:00.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T22:09:31.222Z","etag":null,"topics":["mock","mock-api","mock-generator","mock-server","mock-testing","mocks","mocktools","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MidoAhmed.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}},"created_at":"2023-07-17T11:57:23.000Z","updated_at":"2024-12-17T03:47:13.000Z","dependencies_parsed_at":"2023-07-18T20:34:08.497Z","dependency_job_id":null,"html_url":"https://github.com/MidoAhmed/mock-api-explorer","commit_stats":null,"previous_names":["midoahmed/mockapigenius","midoahmed/mock-api-explorer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MidoAhmed%2Fmock-api-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MidoAhmed%2Fmock-api-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MidoAhmed%2Fmock-api-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MidoAhmed%2Fmock-api-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MidoAhmed","download_url":"https://codeload.github.com/MidoAhmed/mock-api-explorer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244287165,"owners_count":20428887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mock","mock-api","mock-generator","mock-server","mock-testing","mocks","mocktools","typescript"],"created_at":"2024-11-25T00:09:36.516Z","updated_at":"2025-03-18T18:55:07.746Z","avatar_url":"https://github.com/MidoAhmed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MockAPIexplorer\n\nThis repo is a Benchmark/Explore of different/collection tools for mocking REST APIs for front-end development and testing\n\n## Subject:\n\nWhen it comes to mocking APIs for front-end development \u0026 testing, there are two main approaches you can consider:\n\n1. Server-Side Mocking.\n2. **Client-Side Mocking**\n   - Tools: (MirageJS, MSW, JSON Server, etc…)\n   - Manual Mocking: (writing mock data / functions in a file and importing it in the test file)\n\nGoal ==\u003e Explore different tools for mocking REST APIs for front-end development and testing.\n\n## Tools:\n\n**Tested tools and technologies include (branch by tool):**\n\n- [Mirage JS](https://miragejs.com/)\n- [MSW](https://mswjs.io/) + [@mswjs/data](https://github.com/mswjs/data)\n- ~~[json-server](https://github.com/typicode/json-server)~~ (not tested yet)\n- ~~[fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/)~~ (not tested yet)\n- ~~[nock](https://github.com/nock/nock)~~ (not tested yet)\n- ~~[superagent](https://ladjs.github.io/superagent/)~~ (not tested yet)\n\n\u003e Other tools that may be tested in the future include:\n\n- [Mockoon](https://mockoon.com/)\n- [WireMock](http://wiremock.org/)\n- [MockServer](https://www.mock-server.com/)\n\nTools and technologies used in this project are not necessarily recommended for production use.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js ( v18.16.0 used)\n- Clone the repo:\n  ```sh\n  $ git clone https://github.com/MidoAhmed/mock-api-explorer.git\n  $ cd mock-api-explorer\n  ```\n\n### Explore tools\n\n1. Mirage JS\n\n   ```sh\n   $ git checkout miragejs\n   $ npm install\n   $ npm test # run tests with jest to test the miragejs mock api server\n\n   ```\n\n2. MSW\n\n   ```sh\n   $ git checkout msw\n   $ npm install\n   $ npm test # run tests with jest to test the MSW mock api server\n\n   ```\n\n### Comparison\n\n| Criteria      | MirageJS |            MSW |    json-server | Nock | Fetch-mock | Superagent |\n| :------------ | :------: | -------------: | -------------: | ---- | ---------- | ---------- |\n| Supported API |   REST   | REST / GraphQL |           REST | REST |            |            |\n| Environments  | Browser  | Node / Browser | Node / Browser | Node |            |            |\n| Integration   |          |                |                |      |            |            |\n| Definition    |          |                |                |      |            |            |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoahmed%2Fmock-api-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidoahmed%2Fmock-api-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoahmed%2Fmock-api-explorer/lists"}