Skip to content
This repository was archived by the owner on Apr 22, 2026. It is now read-only.

Commit cf45e9c

Browse files
committed
test: remove the proxy.authenticate function before each "http" test
1 parent 2eece52 commit cf45e9c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ describe('HttpsProxyAgent', function () {
116116
});
117117

118118
describe('"http" module', function () {
119+
120+
beforeEach(function () {
121+
delete proxy.authenticate;
122+
});
123+
119124
it('should receive the 407 authorization code on the `http.ClientResponse`', function (done) {
120125
// set a proxy authentication function for this test
121126
proxy.authenticate = function (req, fn) {
@@ -141,7 +146,6 @@ describe('HttpsProxyAgent', function () {
141146
res.on('end', function () {
142147
console.error('"end"', arguments);
143148
});
144-
delete proxy.authenticate;
145149
done();
146150
});
147151

0 commit comments

Comments
 (0)