question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document activate functionality!

See original GitHub issue

Hi 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mitsos1oscommented, Nov 5, 2017

Yes… it seems to be ok…closing the issue then…

1reaction
petersolopovcommented, Nov 5, 2017

It seems that the relevant information has been added in #1002

Read more comments on GitHub >

github_iconTop Results From Across the Web

Document.Activate method (Word) - Microsoft Learn
Activates the specified document so that it becomes the active document. Syntax. expression.Activate. expression Required. A variable that ...
Read more >
Activation: The Principle of Segment Retrieval - MAXQDA
To activate all documents in which a selected code exists at least once, right-click the code in the code system and choose Activate...
Read more >
Bring document foreground (activate document) using ...
This example demonstrates how to bring the document selected by path to foreground (make active) using ISldWorks::ActivateDoc3 SOLIDWORKS API.
Read more >
Activate and configure document ids in a site collection
To use Document IDs to track documents or records, you must first activate the feature in the site collection.
Read more >
Activation Events | Visual Studio Code Extension API
This activation event is emitted and interested extensions will be activated whenever a file that resolves to a certain language gets opened. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found