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

Function testConstructorPostTick

test/parallel/test-tls-connect-abort-controller.js:77–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 async function testConstructorPostTick() {
78 const ac = new AbortController();
79 const { signal } = ac;
80 const socket = new tls.TLSSocket(undefined, connectOptions(signal));
81 setImmediate(() => ac.abort());
82 assert.strictEqual(listenerCount(signal, 'abort'), 1);
83 await assertAbort(socket, 'testConstructorPostTick');
84 }
85
86 await postAbort();
87 await preAbort();

Calls 5

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

Tested by

no test coverage detected