()
| 23 | } |
| 24 | |
| 25 | async function testPullStatefulTransform() { |
| 26 | const stateful = { |
| 27 | transform: async function*(source) { |
| 28 | for await (const chunks of source) { |
| 29 | if (chunks === null) { |
| 30 | yield new TextEncoder().encode('-ASYNC-END'); |
| 31 | continue; |
| 32 | } |
| 33 | for (const chunk of chunks) { |
| 34 | yield chunk; |
| 35 | } |
| 36 | } |
| 37 | }, |
| 38 | }; |
| 39 | const data = await text(pull(from('data'), stateful)); |
| 40 | assert.strictEqual(data, 'data-ASYNC-END'); |
| 41 | } |
| 42 | |
| 43 | async function testPullWithAbortSignal() { |
| 44 | async function* gen() { |
no test coverage detected