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

Function preCreateConnection

test/parallel/test-https-agent-abort-controller.js:42–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 }
41
42 async function preCreateConnection() {
43 const ac = new AbortController();
44 const { signal } = ac;
45 ac.abort();
46 const connection = agent.createConnection({ ...options, signal });
47 const [err] = await once(connection, 'error');
48 assert.strictEqual(err.name, 'AbortError');
49 }
50
51
52 async function agentAsParam() {

Calls 3

abortMethod · 0.95
onceFunction · 0.70
createConnectionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…