npm i nock

9 Tutorials

Find additional tutorials on Google

Mocking HTTP requests with Nock
This is a ‘how to’ article on using Nock to mock HTTP requests during tests. When dealing with code that depends on external services maintaining test coverage and writing reliable tests can be…

API mock testing with Nock
Learn how to use Nock to mock HTTP requests from an API so you can test endpoints without actually calling them.

Mocking External HTTP Requests in Node Tests with Nock
Avoid the challenges of testing Node.js code that depends on external services and APIs by using Nock to test HTTP requests in isolation.
nock examples - CodeSandbox

nock examples - CodeSandbox
Learn how to use nock by viewing and forking nock example apps on CodeSandbox

Testing HTTP Requests in Node.js Using Nock | DigitalOcean
In this article you will learn how to easily test out your HTTP requests with a library called Nock.

Mocking Dependencies in Integration Tests with Nock - Test Automation
Integration tests with nock provides significant gains in speed and reliability by focusing less on actual connectivity and more on adhering to a contract.

5-Minute Intro to Nock for Mocking APIs
Nock is an HTTP mocking library that we can use in our JavaScript unit tests to help with tricky APIs.Code samples are available here:

ep15 - TDD - building a bulletproof JavaScript API Clients with nock
In this episode, I will show you how you can build an API Client with automated unit tests by using axios ( and nock (https://...

#7 - Stub an XHR call (Using nock) | Mocha - Javascript unit testing framework
This is the 7th video tutorial of this web series on Mocha - Javascript unit testing framework. In this tutorial, you will learn about using the nock node pa...