MCPcopy Create free account
hub / github.com/nodejs/node / onlookupService

Function onlookupService

test/async-hooks/test-getnameinforeqwrap.js:19–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17hooks.enable();
18dns.lookupService('127.0.0.1', 80, common.mustCall(onlookupService));
19function onlookupService() {
20 // We don't care about the error here in order to allow
21 // tests to run offline (lookup will fail in that case and the err be set)
22
23 const as = hooks.activitiesOfTypes('GETNAMEINFOREQWRAP');
24 assert.strictEqual(as.length, 1);
25
26 const a = as[0];
27 assert.strictEqual(a.type, 'GETNAMEINFOREQWRAP');
28 assert.strictEqual(typeof a.uid, 'number');
29 assert.strictEqual(a.triggerAsyncId, 1);
30 checkInvocations(a, { init: 1, before: 1 },
31 'while in onlookupService callback');
32 tick(2);
33}
34
35process.on('exit', onexit);
36

Callers

nothing calls this directly

Calls 2

activitiesOfTypesMethod · 0.80
tickFunction · 0.50

Tested by

no test coverage detected