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…
Mocking Dependencies in Integration Tests with Nock - Test Automation
blog.testproject.io
Integration tests with nock provides significant gains in speed and reliability by focusing less on actual connectivity and more on adhering to a contract.