Skip to content

Commit 360ec4a

Browse files
get rid of http interceptors in wrong process
1 parent 91609b5 commit 360ec4a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

packages/compass-e2e-tests/tests/no-network-traffic.test.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,6 @@ import os from 'os';
1111
import http from 'http';
1212
import https from 'https';
1313

14-
// Intercept HTTP requests
15-
const originalHttpRequest = http.request;
16-
http.request = function (...args: any[]) {
17-
console.log('HTTP Request:', args);
18-
return originalHttpRequest.apply(this, args as any);
19-
};
20-
21-
// Intercept HTTPS requests
22-
const originalHttpsRequest = https.request;
23-
https.request = function (...args: any[]) {
24-
console.log('HTTPS Request:', args);
25-
return originalHttpsRequest.apply(this, args as any);
26-
};
27-
28-
// If you want to intercept at an even lower level:
29-
const originalClientRequest = http.ClientRequest;
30-
http.ClientRequest = function () {
31-
console.log('Client Request:', arguments);
32-
return new originalClientRequest(arguments as any);
33-
} as any;
34-
3514
/**
3615
* @securityTest Enhanced Network Isolation Tests
3716
*

0 commit comments

Comments
 (0)