request-debug
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -73,2 +73,9 @@ var clone = require('clone'); | ||
} | ||
if (!request.stopDebugging) { | ||
request.stopDebugging = function() { | ||
proto.init = proto._initBeforeDebug; | ||
delete proto._initBeforeDebug; | ||
}; | ||
} | ||
}; | ||
@@ -75,0 +82,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description" : "Library to assist with debugging HTTP(s) requests made by the request module.", | ||
"version" : "0.0.2", | ||
"version" : "0.0.3", | ||
"repository" : { | ||
@@ -8,0 +8,0 @@ "type" : "git", |
@@ -50,2 +50,6 @@ # request-debug [![Build status](https://img.shields.io/travis/nylen/request-debug.svg?style=flat)](https://travis-ci.org/nylen/request-debug) [![npm package](http://img.shields.io/npm/v/request-debug.svg?style=flat)](https://www.npmjs.org/package/request-debug) | ||
To disable debugging, call `request.stopDebugging()` (this function only exists | ||
if debugging has already been enabled). Any requests that are in progress when | ||
`stopDebugging()` is called will still generate debug events. | ||
## Example | ||
@@ -52,0 +56,0 @@ |
@@ -481,2 +481,11 @@ var lib = require('./lib'), | ||
}); | ||
it('should not capture anything after stopDebugging()', function(done) { | ||
request.stopDebugging(); | ||
request(lib.urls.http + '/bottom', function(err, res, body) { | ||
should.not.exist(err); | ||
lib.requests.should.eql([]); | ||
done(); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33947
652
124