The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 19 JavaScript Mock Projects
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
restapify
Quickly and easily deploy a mocked REST API by using an intuitive and developer friendly JSON file structure
-
http-request-mock
Intercept & mock http requests issued by XMLHttpRequest, fetch, nodejs https/http module, axios, jquery, superagent, ky, node-fetch, request, got or any other request libraries by intercepting XMLHttpRequest, fetch and nodejs native requests at low level.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
So, why would you want a REAL server to mock request/reponses? You have a lot of intercepts today that sit on the network layer and you can define things like "If you send request to that endpoint, with that json, please return that Status" (for NodeJS example, Nock - https://github.com/nock/nock)
Project mention: Exploring Mirage JS: Simplifying API Mocking in React Development | dev.to | 2023-08-07Mirage JS GitHub Repository
Ejecting a React app is a bad idea because our application will lose all the React configurations and will not benefit from the CRA updates. Some solutions for ejecting our application include using packages like react-app-rewired or rewire. You can also use CRACO to eject your React application, but it needs you to install additional plugins.
Project mention: What libraries do you use to mock API calls in a React app? | /r/reactjs | 2023-12-06I wrote mock-requests before MSW came out. It was, to my knowledge, the first dev-friendly mocking library out there that didn't involve setting up a separate server yet still allowed dynamic responses. Since MSW came out, I still think mock-requests has a better and simpler API but MSW allows you to see the network request in the browser's dev tools which is super nice IMO.
JavaScript Mock related posts
- What libraries do you use to mock API calls in a React app?
- Exploring Mirage JS: Simplifying API Mocking in React Development
- Mock server
- The Definitive Guide to Make API Calls in React
- Contract Testing?
- How to mock the return value of an rtk query hook?
- These 20 startups are in 1st ever batch of GitHub OS Accelerator
-
A note from our sponsor - WorkOS
workos.com | 25 Apr 2024
Index
What are some of the best open-source Mock projects in JavaScript? This list will help you:
Project | Stars | |
---|---|---|
1 | Nock | 12,527 |
2 | miragejs | 5,281 |
3 | axios-mock-adapter | 3,365 |
4 | rewire | 3,069 |
5 | jest-canvas-mock | 305 |
6 | main | 272 |
7 | mocktail | 206 |
8 | smoke | 179 |
9 | parrot | 136 |
10 | open-api-mocker | 108 |
11 | restapify | 96 |
12 | jest-how-do-i-mock-x | 95 |
13 | mocko | 70 |
14 | http-request-mock | 62 |
15 | elasticsearch-js-mock | 45 |
16 | mock-requests | 35 |
17 | mock-match-media | 21 |
18 | openapi-enricher | 5 |
19 | such-cli | 3 |
Sponsored