()
| 20 | // Stand-in for the per-dispatch RequestController of an active connection. It |
| 21 | // records the flow-control calls the proxy forwards to it. |
| 22 | function activeConnectionController () { |
| 23 | const calls = [] |
| 24 | return { |
| 25 | calls, |
| 26 | paused: true, |
| 27 | aborted: true, |
| 28 | reason: new Error('boom'), |
| 29 | rawHeaders: ['content-length', '2'], |
| 30 | rawTrailers: ['x-trailer', 'value'], |
| 31 | pause () { calls.push('pause') }, |
| 32 | resume () { calls.push('resume') }, |
| 33 | abort (reason) { calls.push(['abort', reason]) } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | test('controller proxy returns safe defaults and is a no-op before a connection is active', (t) => { |
| 38 | t = tspl(t, { plan: 6 }) |
no outgoing calls
no test coverage detected
searching dependent graphs…