(n, stage)
| 32 | } |
| 33 | |
| 34 | function 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 | |
| 49 | function onconnection(conn) { |
| 50 | conn.write('hi'); // Let the client know we're ready. |
no test coverage detected