nock
HTTP Mocking for Node.js
Funding Links: https://github.com/sponsors/nock, https://opencollective.com/nock
- Name: Nock
- Location: Los Angeles
- Kind: organization
- Followers: 12
- Following: 0
- Total stars: 12539
- Repositories count: 5
- Created at: 2022-11-02T16:26:01.979Z
- Updated at: 2024-04-14T06:43:09.440Z
- Last synced at: 2024-04-14T06:43:08.202Z
GitHub Sponsors Profile
nock is the most widely used http mocking library for Node.js. It's first commit by @pgte is from September 2011. Around 6 years later, Pedro invited @gr2m as a maintainer, about a year after Pedro was no longer able to maintain nock himself.
Over time, a new maintainers team took on nock, with the goal to make the project easier to maintain and to contribute to. Most notably, we achieved 100% test coverage, setup automated releases, triaged all open issues and pull requests, and started to document the vast code base that grew organically over a decade..
nock is a huge monolith of intertwined logic which is hard to understand and impossible to maintain with a few hours of time that people graciously donated by its maintainers and contributors from time to time.
In order to make nock's code base easier to understand, to maintain, and to make it possible to distribute the maintainership across more people, we decided the code base needs to be split up into separate modules
@nock/intercept - overwrite Node's native APIs to hook into the request lifecycle.
@nock/mock - provides API to define HTTP mocks
@nock/recorder - APIs to record requests/responses and replay them from files
We decided to use $3,000 of a past sponsorship to start off this work with a focused effort by @gr2m, but it will not be enough. You can follow along on the process at https://github.com/nock/nock/discussions/2247
- Current Sponsors: 1
- Past Sponsors: 4
- Total Sponsors: 5
- Minimum Sponsorship: $5.00
Active Sponsors
Past Sponsors
Sponsor Breakdown
- User: 1
- Organization: 4