()
| 64 | process.on('exit', onexit); |
| 65 | |
| 66 | function onexit() { |
| 67 | hooks.disable(); |
| 68 | hooks.sanityCheck('PROCESSWRAP'); |
| 69 | hooks.sanityCheck('PIPEWRAP'); |
| 70 | |
| 71 | checkInvocations( |
| 72 | processwrap, |
| 73 | { init: 1, before: 1, after: 1 }, |
| 74 | 'processwrap while in onsleepClose callback'); |
| 75 | |
| 76 | [ pipe1, pipe2, pipe3 ].forEach((x) => { |
| 77 | assert.strictEqual(x.type, 'PIPEWRAP'); |
| 78 | assert.strictEqual(x.triggerAsyncId, 1); |
| 79 | }); |
| 80 | |
| 81 | const ioEvents = Math.min(pipe2.before.length, pipe2.after.length); |
| 82 | // 2 events without any IO and at least one more for the node version data. |
| 83 | // Usually it is just one event, but it can be more. |
| 84 | assert.ok(ioEvents >= 3, `at least 3 stdout io events, got ${ioEvents}`); |
| 85 | |
| 86 | checkInvocations(pipe1, { init: 1, before: 1, after: 1 }, |
| 87 | 'pipe wrap when sleep.spawn was called'); |
| 88 | checkInvocations(pipe2, { init: 1, before: ioEvents, after: ioEvents }, |
| 89 | 'pipe wrap when sleep.spawn was called'); |
| 90 | checkInvocations(pipe3, { init: 1, before: 2, after: 2 }, |
| 91 | 'pipe wrap when sleep.spawn was called'); |
| 92 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…