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

Function test

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

Source from the content-addressed store, hash-verified

27});
28
29function test(n) {
30 get(`http://localhost:${server.address().port}/${n}`, common.mustCall(function(res) {
31 res.setEncoding('utf8');
32
33 let body = '';
34 res.on('data', function(chunk) {
35 body += chunk;
36 });
37
38 res.on('end', common.mustCall(function() {
39 assert.deepStrictEqual(JSON.parse(body), { state: `/${n}` });
40 }));
41 }));
42}
43
44server.listen(0, common.mustCall(function() {
45 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…