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 (40.2K stars). GitHub.Locker tracks 8 Mocking repositories with 245.4K stars combined. The fastest-growing on November 30 was insomnia, with +4 stars in a day.

8Projects
245.4KStars in total
+10Stars in a day

Hot right now

Most stars gained in a day · Nov 30

The all-time top

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

    40.2K
  1. 4

    testify

    26.3Kstretchr/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.

  2. 5

    msw

    18.4Kmswjs/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.

  3. 6

    mockito

    15.4Kmockito/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.

  4. 7

    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.

  5. 8

    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.

Often tagged together