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

Function runTest

test/parallel/test-http2-info-headers-errors.js:65–88  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

63server.listen(0, common.mustCall(() => runTest(tests.shift())));
64
65function runTest(test) {
66 const client = http2.connect(`http://localhost:${server.address().port}`);
67 const req = client.request({ ':method': 'POST' });
68
69 currentError = test;
70 req.resume();
71 req.end();
72
73 req.on('error', common.expectsError({
74 code: 'ERR_HTTP2_STREAM_ERROR',
75 name: 'Error',
76 message: 'Stream closed with error code NGHTTP2_INTERNAL_ERROR'
77 }));
78
79 req.on('close', common.mustCall(() => {
80 client.close();
81
82 if (!tests.length) {
83 server.close();
84 } else {
85 runTest(tests.shift());
86 }
87 }));
88}

Calls 8

connectMethod · 0.65
addressMethod · 0.65
requestMethod · 0.65
resumeMethod · 0.65
closeMethod · 0.65
endMethod · 0.45
onMethod · 0.45
shiftMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…