JavaScript Mock

Open-source JavaScript projects categorized as Mock

Top 19 JavaScript Mock Projects

  • Nock

    HTTP server mocking and expectations library for Node.js

  • Project mention: Contract Testing? | /r/softwaretesting | 2023-05-01

    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)

  • miragejs

    A client-side server to build, test and share your JavaScript app

  • Project mention: Exploring Mirage JS: Simplifying API Mocking in React Development | dev.to | 2023-08-07

    Mirage JS GitHub Repository

  • 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.

    SurveyJS logo
  • axios-mock-adapter

    Axios adapter that allows to easily mock requests

  • rewire

    Easy monkey-patching for node.js unit tests (by jhnns)

  • Project mention: Build a web editor with react-monaco-editor | dev.to | 2023-05-04

    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.

  • jest-canvas-mock

    :last_quarter_moon: A module used to mock canvas in Jest.

  • main

    Node.js mock server running live, interactive mocks in place of real APIs (by mocks-server)

  • mocktail

    Free, 11MB, containerized, self-hosted mock server.

  • 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.

    WorkOS logo
  • smoke

    :dash: Simple yet powerful file-based mock server with recording abilities

  • parrot

    ✨ Scenario-based HTTP mocking (by americanexpress)

  • Project mention: Mock server | /r/node | 2023-06-21
  • open-api-mocker

    A mock server based in OpenAPI Specification

  • restapify

    Quickly and easily deploy a mocked REST API by using an intuitive and developer friendly JSON file structure

  • jest-how-do-i-mock-x

    Runnable examples for common testing situations that often prove challenging

  • mocko

    Mocking made easy, proxy your API and choose which endpoints to mock

  • 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.

  • elasticsearch-js-mock

    Mock utility for the Elasticsearch's Node.js client

  • mock-requests

    The first fetch/XMLHttpRequest network-mocking library that's actually user-friendly

  • Project mention: What libraries do you use to mock API calls in a React app? | /r/reactjs | 2023-12-06

    I 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.

  • mock-match-media

    Mock window.matchMedia for Node.JS environments (like tests or NextJS)

  • openapi-enricher

    Enrich an OpenAPI spec with response examples to mock it efficiently

  • such-cli

    A command line tool for generating fake data and run a mock server.

  • 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.

    InfluxDB logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

JavaScript Mock related posts

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
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.
www.influxdata.com