()
| 12 | } |
| 13 | |
| 14 | function testPullSyncStatelessTransform() { |
| 15 | const upper = (chunks) => { |
| 16 | if (chunks === null) return null; |
| 17 | return chunks.map((c) => { |
| 18 | const str = new TextDecoder().decode(c); |
| 19 | return new TextEncoder().encode(str.toUpperCase()); |
| 20 | }); |
| 21 | }; |
| 22 | const data = bytesSync(pullSync(fromSync('abc'), upper)); |
| 23 | assert.deepStrictEqual(data, new TextEncoder().encode('ABC')); |
| 24 | } |
| 25 | |
| 26 | function testPullSyncStatefulTransform() { |
| 27 | const source = fromSync('data'); |
no test coverage detected
searching dependent graphs…