(req, res, targetHost)
| 63 | test("intercepts HTTPS requests to configured domains", async () => { |
| 64 | const requests: Array<{ host: string; url: string }> = []; |
| 65 | const handler: RequestHandler = (req, res, targetHost) => { |
| 66 | requests.push({ host: targetHost, url: req.url ?? "/" }); |
| 67 | res.writeHead(200, { "content-type": "text/plain" }); |
| 68 | res.end("mocked"); |
| 69 | return true; |
| 70 | }; |
| 71 | |
| 72 | const proxy = new ConnectProxy(handler, { |
| 73 | interceptDomains: ["test.example.com"], |
no test coverage detected
searching dependent graphs…