TypeScript Mock

Open-source TypeScript projects categorized as Mock

Top 23 TypeScript Mock Projects

  • msw

    Seamless REST/GraphQL API mocking library for browser and Node.js.

  • Project mention: Visual Introduction to Frontend Testing Types | dev.to | 2024-05-10

    Mock Service Worker - https://mswjs.io/ (Mocking the API Responses in the browser without creating a separate mock server)

  • mockoon

    Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.

  • Project mention: Handling Firebase Notifications in Flutter: Practical Tips | dev.to | 2024-01-14

    Mockoon - Used as a logging server instead of using print in the console.

  • 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
  • graphql-tools

    :wrench: Utility library for GraphQL to build, stitch and mock GraphQL schemas in the SDL-first approach

  • falso

    All the Fake Data for All Your Real Needs 🙂

  • graphql-faker

    🎲 Mock or extend your GraphQL API with faked data. No coding required.

  • mongodb-memory-server

    Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config).

  • orval

    orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺

  • Project mention: HonoJS: Small, simple, and ultrafast web framework for the Edges | news.ycombinator.com | 2024-04-15

    In cases where the client needs to stay separate, we have had a good experience with Orval[1] to generate a fully-typed @tanstack/query client from our OpenAPI spec.

    [1] https://orval.dev/

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

    Generate custom HTTP responses, the simpler way to test your Web Services

  • smocker

    Smocker is a simple and efficient HTTP mock server and proxy

  • Project mention: Smocker: Smocker is a simple and efficient HTTP mock server and proxy | news.ycombinator.com | 2024-02-21
  • ng-mocks

    Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup

  • Project mention: Angular (v15) MatStepper + Jest (v29) + ng-mocks | /r/Angular2 | 2023-06-13
  • jest-mock-extended

    Type safe mocking extensions for Jest https://www.npmjs.com/package/jest-mock-extended

  • mockttp

    Powerful friendly HTTP mock server & proxy library

  • Project mention: Client-side proxies – a better way to individualise the Internet? (2000) | news.ycombinator.com | 2023-07-23

    Interesting how the world has changed since the 2000s here - nowadays the ecosystem is far better, so it's much easier to set up tools to mess around with this, but the use of HTTPS everywhere makes it more difficult in more advanced cases (e.g. you'll often need to fight certificate configuration in individual clients).

    In part because of that, browser extensions have become the main way to go for this kind of local web modification, but now there's new restrictions slowly coming in there too.

    If you want to mess around with HTTP-level rewriting for yourself though, I maintain a Node.js library for easily writing tiny custom HTTP & HTTPS-intercepting proxies that makes it very easy: https://github.com/httptoolkit/mockttp/. Others have built more specific tooling on top too, like this web page modification proxy: https://github.com/OnkelTem/wmod-proxy

    There's a walkthrough for setting up a quick local proxy & rewriting your own browser traffic here: https://httptoolkit.com/blog/javascript-mitm-proxy-mockttp/

  • aws-sdk-client-mock

    AWS JavaScript SDK v3 mocks for easy unit testing. 🖋️ Typed 🔬 Tested 📄 Documented 🛠️ Maintained

  • openapi-backend

    Build, Validate, Route, Authenticate and Mock using OpenAPI

  • Project mention: Full stack typesafe API-first development for REST | news.ycombinator.com | 2023-10-11
  • shoehorn

    Work seamlessly with partial mocks in TypeScript.

  • Project mention: Partial: how not to mock the whole world | dev.to | 2024-02-08

    Yeah, the last line is 🤮 and one can improve it with utilities like shoehorn hiding all complexity underneath.

  • msw-storybook-addon

    Mock API requests in Storybook with Mock Service Worker.

  • observer-spy

    This library makes RxJS Observables testing easy!

  • automock

    Easier Unit Testing for TypeScript Dependency Injection Frameworks

  • Project mention: Unit Test Like a Pro: Automock, My Open Source Answer to Mocking Frustration 🤓💡🎭 | dev.to | 2023-12-12

    🔗 Here are some links to check out: 😎 GitHub: https://github.com/automock/automock 🐈 Automock's NestJS Official Recipe: https://docs.nestjs.com/recipes/automock 📦 NPM: https://www.npmjs.com/package/@automock/jest 📚 Docs Website: https://automock.dev

  • shallow-render

    Angular testing made easy with shallow rendering and easy mocking. https://getsaf.github.io/shallow-render

  • jest-dynalite

    Jest preset to run Dynalite (DynamoDB local) per test runner

  • laika

    Log, test, intercept and modify Apollo Client's operations (by zendesk)

  • strong-mock

    Type safe mocking library for TypeScript

  • mock-github

    A library to create a local github environment and easily mock github APIs using an octokit like interface

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub 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).

TypeScript Mock related posts

  • Visual Introduction to Frontend Testing Types

    2 projects | dev.to | 10 May 2024
  • Easier TypeScript API Testing with Vitest + MSW

    3 projects | dev.to | 25 Apr 2024
  • Creating mocks for testing react code

    1 project | dev.to | 22 Apr 2024
  • Storybook 8

    5 projects | news.ycombinator.com | 13 Mar 2024
  • I made "TypeScript Swagger Editor", new type of Swagger UI writing TypeScript code in the browser

    3 projects | dev.to | 18 Feb 2024
  • Partial: how not to mock the whole world

    4 projects | dev.to | 8 Feb 2024
  • Ask HN: Those making $500+/month on side projects in 2024 – Show and tell

    1 project | news.ycombinator.com | 10 Jan 2024
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 3 Jun 2024
    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. Learn more →

Index

What are some of the best open-source Mock projects in TypeScript? This list will help you:

Project Stars
1 msw 14,977
2 mockoon 5,967
3 graphql-tools 5,299
4 falso 3,137
5 graphql-faker 2,675
6 mongodb-memory-server 2,480
7 orval 2,383
8 Mocky 2,016
9 smocker 1,116
10 ng-mocks 1,008
11 jest-mock-extended 794
12 mockttp 743
13 aws-sdk-client-mock 732
14 openapi-backend 581
15 shoehorn 432
16 msw-storybook-addon 382
17 observer-spy 372
18 automock 300
19 shallow-render 269
20 jest-dynalite 148
21 laika 120
22 strong-mock 99
23 mock-github 53

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com