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

Function testConstructorPostTick

test/parallel/test-net-connect-abort-controller.js:75–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 async function testConstructorPostTick() {
76 const ac = new AbortController();
77 const { signal } = ac;
78 const socket = new net.Socket(socketOptions(signal));
79 assert.strictEqual(listenerCount(signal, 'abort'), 1);
80 setImmediate(() => ac.abort());
81 await assertAbort(socket, 'testConstructorPostTick');
82 }
83
84 await postAbort();
85 await preAbort();

Calls 5

abortMethod · 0.95
socketOptionsFunction · 0.85
listenerCountFunction · 0.85
assertAbortFunction · 0.85
setImmediateFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…