Skip to content

Commit

Permalink
nock#1836 fixes expected Node behaviour for http.get
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethaasan committed Dec 18, 2019
1 parent ad0babd commit 931d92c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/common.js
Expand Up @@ -99,7 +99,11 @@ function overrideRequests(newRequest) {
}
// https://nodejs.org/api/http.html#http_http_get_options_callback
module.get = function(input, options, callback) {
const req = module.request(input, options, callback)
const req = newRequest(proto, overriddenGet.bind(module), [
input,
options,
callback,
])
req.end()
return req
}
Expand Down

0 comments on commit 931d92c

Please sign in to comment.