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

Function test

test/parallel/test-async-hooks-execution-async-resource-await.js:34–47  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

32});
33
34function test(n) {
35 get(`http://localhost:${server.address().port}/${n}`, common.mustCall(function(res) {
36 res.setEncoding('utf8');
37
38 let body = '';
39 res.on('data', function(chunk) {
40 body += chunk;
41 });
42
43 res.on('end', common.mustCall(function() {
44 assert.deepStrictEqual(JSON.parse(body), { state: `/${n}` });
45 }));
46 }));
47}
48
49server.listen(0, common.mustCall(function() {
50 server.unref();

Calls 5

getFunction · 0.70
addressMethod · 0.65
parseMethod · 0.65
setEncodingMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…