(req)
| 106 | } |
| 107 | |
| 108 | function readBody(req) { |
| 109 | return new Promise((resolve) => { |
| 110 | const chunks = []; |
| 111 | req.on('data', (c) => chunks.push(c)); |
| 112 | req.on('end', () => { |
| 113 | try { resolve(JSON.parse(Buffer.concat(chunks).toString() || '{}')); } |
| 114 | catch { resolve({}); } |
| 115 | }); |
| 116 | }); |
| 117 | } |
| 118 | |
| 119 | describe('proxy /asset/* -> hub envelope wrapping (e2e)', () => { |
| 120 | let hub, hubUrl, proxy, proxyUrl, dataDir; |
no test coverage detected