Mocking NodeJS request and response with Nock

I'm trying to get the grasp of the tool Nock in order to mock the request and response from my code doing the calls. I'm using npm request as a simple HTTP client to request the back-end REST API, Chai for the expectation library and Mocha to run my tests. Here is the code that I have for the tests:

This single test is passing and I don't understand why. It seems like it is actually doing a real call and not using my fake nock request/response. If I comment the nock section or change:

.reply(200, getIssueResponse) to .reply(404)

It doesn't break the test and nothing change, I'm not doing anything with my nock variable. Can someone please explain me with a clear example how to mock the request and response in my NodeJS http-client using Nock?

Important note: when putting an http request in "stream mode" the data event could (and probably does) gets fired multiple times, each one for a "chunk" of data, over internet chunks could be variable between 1400 to 64000 bytes, so expect multiple callback invocations (that's a very special kind of bad)

As a simple suggestion, you can try using request or just concatenate the received data, then invoke the callback on the end event.