Document activate functionality!
See original GitHub issueHi there, We are using Nock in our test suite, and I can say it really helps out in API testing. However there is an important missing information in the module documentation.
It is not mentioned in the readme that the module initiates its overrides as soon as you require it!
This has the result that the documented .restore()
function that is supposed to restore the original behaviour of http
module, disables all the usage of nock elsewhere in the code even if you use it to re-nock some urls.
To make things more clear:
Restore should be noted that it completely disables the module wherever it is loaded in the same runtime, and in order to use it again you have to call the activate
function which is exported from the module and auto run during module requirement, in order to enable the functionality of the module again.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Yes… it seems to be ok…closing the issue then…
It seems that the relevant information has been added in #1002