()
| 11 | } |
| 12 | |
| 13 | async function testPullStatelessTransform() { |
| 14 | const upper = (chunks) => { |
| 15 | if (chunks === null) return null; |
| 16 | return chunks.map((c) => { |
| 17 | const str = new TextDecoder().decode(c); |
| 18 | return new TextEncoder().encode(str.toUpperCase()); |
| 19 | }); |
| 20 | }; |
| 21 | const data = await text(pull(from('abc'), upper)); |
| 22 | assert.strictEqual(data, 'ABC'); |
| 23 | } |
| 24 | |
| 25 | async function testPullStatefulTransform() { |
| 26 | const stateful = { |
no test coverage detected