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.
Hot right now
Most stars gained in a day · Oct 16
json-server
typicode/json-server · ★ 75.7Kjson-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.
+4insomnia
Kong/insomnia · ★ 40KInsomnia is an open-source, cross-platform API client for debugging, designing, testing and mocking APIs over GraphQL, REST, WebSockets, SSE and gRPC.
msw
mswjs/msw · ★ 18.3KMock 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.
+3pollyjs
Netflix/pollyjs · ★ 10.3KIt'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.
The all-time top
12 projects · by stars
- 75.7K
#1 · typicode/json-serverjson-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.
- 45.5K
#2 · jestjs/jestjest
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.
- 40K
#3 · Kong/insomniainsomnia
Insomnia is an open-source, cross-platform API client for debugging, designing, testing and mocking APIs over GraphQL, REST, WebSockets, SSE and gRPC.
- 4

yapi
27.7KYMFE/yapi · JavaScriptYApi is a visual API management platform for developers, product managers and QA: one place to document, debug, mock and automatically test your APIs.
- 5

testify
26.2Kstretchr/testify · GoTestify 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.
- 6

javascript-testing-best-practices
24.6Kgoldbergyoni/javascript-testing-best-practices · JavaScriptA 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.
- 7

Mock
19.6Knuysoft/Mock · JavaScriptMock.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.
- 8
msw
18.3Kmswjs/msw · TypeScriptMock 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.
- 9

mockito
15.5Kmockito/mockito · JavaMockito 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.
- 10

nock
13.1Knock/nock · JavaScriptNock is a Node.js library that mocks HTTP servers so you can test code that performs HTTP requests without hitting a real network.
- 11

mockery
10.7Kmockery/mockery · PHPA 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.
- 12

pollyjs
10.3KNetflix/pollyjs · JavaScriptIt'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.
Related topics
Often tagged together