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

Function test

test/parallel/test-http-client-response-domain.js:45–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}));
44
45function test() {
46
47 d.on('error', common.mustCall((err) => {
48 assert.strictEqual(err.message, 'should be caught by domain');
49 }));
50
51 const req = http.get({
52 socketPath: common.PIPE,
53 headers: { 'Content-Length': '1' },
54 method: 'POST',
55 path: '/'
56 });
57 req.on('response', function(res) {
58 res.on('end', function() {
59 res.emit('error', new Error('should be caught by domain'));
60 });
61 res.resume();
62 });
63 req.end();
64}

Callers

nothing calls this directly

Calls 5

getMethod · 0.65
resumeMethod · 0.65
onMethod · 0.45
emitMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…