(stream: Readable)
| 54 | } |
| 55 | |
| 56 | async function readStream(stream: Readable): Promise<string> { |
| 57 | const chunks: Buffer[] = [] |
| 58 | for await (const chunk of stream) chunks.push(Buffer.from(chunk)) |
| 59 | return Buffer.concat(chunks).toString('utf8') |
| 60 | } |
| 61 | |
| 62 | function expectCode(error: unknown, code: MultipartError['code']) { |
| 63 | expect(isMultipartError(error)).toBe(true) |
no test coverage detected