MCPcopy Index your code
hub / github.com/nodejs/node / testNetworkInspection

Function testNetworkInspection

test/parallel/test-inspector-network-fetch.js:193–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191}
192
193const testNetworkInspection = async () => {
194 // HTTP
195 await testRequest(`http://127.0.0.1:${httpServer.address().port}/hello-world`);
196 session.removeAllListeners();
197 // HTTPS
198 await testRequest(`https://127.0.0.1:${httpsServer.address().port}/hello-world`);
199 session.removeAllListeners();
200 // HTTP with invalid host
201 await testRequestError(`http://${addresses.INVALID_HOST}/`);
202 session.removeAllListeners();
203 // HTTPS with invalid host
204 await testRequestError(`https://${addresses.INVALID_HOST}/`);
205 session.removeAllListeners();
206};
207
208httpServer.listen(0, () => {
209 httpsServer.listen(0, async () => {

Callers 1

Calls 4

testRequestErrorFunction · 0.85
testRequestFunction · 0.70
addressMethod · 0.65
removeAllListenersMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…