HTTP server mocking and expectations library for Node.js
Nock is hTTP server mocking and expectations library for Node.js. Licensed under MIT, it is very popular in the JavaScript ecosystem with 6.0M weekly downloads.
Nock has an excellent overall health score of 85/100. Its strongest dimension is maintenance (100/100), while quality (50/100) is the area with most room for improvement. This package is well-maintained and actively used.
Best packages for testing and mocking HTTP APIs in Node.js and React — MSW v2, nock, Supertest, and Hono's test client. Which to use for unit vs integration vs E2E API testing.
2026-03-09T00:00:00.000ZMSW, nock, and Mirage.js compared for API mocking in tests. Service Worker mocking, network-level interception, and which API mock library to use in 2026.
2026-03-08T00:00:00.000ZBest npm packages for API testing and HTTP mocking in 2026. MSW, Supertest, Nock, and more compared — browser and Node.js mocking, integration tests, and API assertions.
2026-03-08T00:00:00.000Z