Topics / #mocking

Mocking projects on GitHub

Creating test doubles and mocks to isolate code under test.

As of , the most-starred Mocking projects on GitHub are json-server (75.7K stars), jest (45.5K stars) and insomnia (40K stars). GitHub.Locker tracks 12 Mocking repositories with 327.2K stars combined. The fastest-growing on October 16 was json-server, with +4 stars in a day.

12Projects
327.2KStars in total
+21Stars in a day

Hot right now

Most stars gained in a day · Oct 16

The all-time top

12 projects · by stars

  1. #1 · typicode/json-server

    json-server

    json-server lets you spin up a fully working fake REST API in under 30 seconds, with no backend code to write — just a single JSON file defining your data.

    75.7K
  2. #2 · jestjs/jest

    jest

    Jest is a JavaScript testing framework focused on simplicity, with built-in test running, assertions, and mocking that works out of the box for most JavaScript projects.

    45.5K
  3. #3 · Kong/insomnia

    insomnia

    Insomnia is an open-source, cross-platform API client for debugging, designing, testing and mocking APIs over GraphQL, REST, WebSockets, SSE and gRPC.

    40K
  1. 4

    yapi

    27.7KYMFE/yapi · JavaScript

    YApi is a visual API management platform for developers, product managers and QA: one place to document, debug, mock and automatically test your APIs.

  2. 5

    testify

    26.2Kstretchr/testify · Go

    Testify is a toolkit of Go packages that add assertions, mocking and test suites on top of the standard library, so tests are easier to write and failures are easy to read.

  3. 6

    javascript-testing-best-practices

    24.6Kgoldbergyoni/javascript-testing-best-practices · JavaScript

    A free, in-depth guide with 50+ best practices for testing JavaScript and Node.js applications, compiled and curated from dozens of blog posts, books and tools.

  4. 7

    Mock

    19.6Knuysoft/Mock · JavaScript

    Mock.js is a JavaScript library that generates simulated data and mocks ajax requests, so front-end development and automated tests can run without waiting on a real back-end.

  5. 8

    msw

    18.3Kmswjs/msw · TypeScript

    Mock Service Worker (MSW) is the industry-standard API mocking library for JavaScript. It intercepts the network requests your app makes and serves mock responses you define, so you never touch a real backend.

  6. 9

    mockito

    15.5Kmockito/mockito · Java

    Mockito is a mocking framework for unit tests written in Java, and the most popular one: it creates mock objects so you can test a class in isolation from its dependencies.

  7. 10

    nock

    13.1Knock/nock · JavaScript

    Nock is a Node.js library that mocks HTTP servers so you can test code that performs HTTP requests without hitting a real network.

  8. 11

    mockery

    10.7Kmockery/mockery · PHP

    A PHP mock object framework for unit testing: it builds test doubles (mocks) through a succinct, human-readable DSL, so your tests can call fakes instead of real objects.

  9. 12

    pollyjs

    10.3KNetflix/pollyjs · JavaScript

    It's Polly.JS, a JavaScript library from Netflix that records, replays, and stubs HTTP interactions, so your test suite doesn't need a live API to run against.

Often tagged together