Nock
HTTP server mocking and expectations library for Node.js
HTTP server mocking and expectations library for Node.js. Nock can be used to test modules that perform HTTP requests in isolation. For instance, if a module performs HTTP requests to a CouchDB server or makes HTTP requests to the Amazon API, you can test that module in isolation. Nock works by overriding Node's http.request function. Also, it overrides http.ClientRequest too to cover for modules that use it directly.