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

Function checkDestroyedWriteWraps

test/async-hooks/test-writewrap.js:34–47  ·  view source on GitHub ↗
(n, stage)

Source from the content-addressed store, hash-verified

32}
33
34function checkDestroyedWriteWraps(n, stage) {
35 const as = hooks.activitiesOfTypes('WRITEWRAP');
36 assert.strictEqual(as.length, n,
37 `${as.length} out of ${n} WRITEWRAPs when ${stage}`);
38
39 function checkValidWriteWrap(w) {
40 assert.strictEqual(w.type, 'WRITEWRAP');
41 assert.strictEqual(typeof w.uid, 'number');
42 assert.strictEqual(typeof w.triggerAsyncId, 'number');
43
44 checkInvocations(w, { init: 1 }, `when ${stage}`);
45 }
46 as.forEach(checkValidWriteWrap);
47}
48
49function onconnection(conn) {
50 conn.write('hi'); // Let the client know we're ready.

Callers 5

onconnectionFunction · 0.85
onconnectFunction · 0.85
onafterwriteFunction · 0.85
onserverClosedFunction · 0.85
onexitFunction · 0.85

Calls 2

activitiesOfTypesMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected