()
| 45 | } |
| 46 | |
| 47 | function testPullSyncChainedTransforms() { |
| 48 | const addExcl = (chunks) => { |
| 49 | if (chunks === null) return null; |
| 50 | return [...chunks, new TextEncoder().encode('!')]; |
| 51 | }; |
| 52 | const addQ = (chunks) => { |
| 53 | if (chunks === null) return null; |
| 54 | return [...chunks, new TextEncoder().encode('?')]; |
| 55 | }; |
| 56 | const result = pullSync(fromSync('hello'), addExcl, addQ); |
| 57 | const data = new TextDecoder().decode(bytesSync(result)); |
| 58 | assert.strictEqual(data, 'hello!?'); |
| 59 | } |
| 60 | |
| 61 | // PullSync source error propagates |
| 62 | function testPullSyncSourceError() { |
no test coverage detected
searching dependent graphs…