Feed `chunks` through the filter one at a time and return the concatenated visible output.
(chunks: string[])
| 3 | |
| 4 | /** Feed `chunks` through the filter one at a time and return the concatenated visible output. */ |
| 5 | function run(chunks: string[]): string { |
| 6 | const f = new StreamDisplayFilter(); |
| 7 | let out = ''; |
| 8 | for (const c of chunks) out += f.push(c); |
| 9 | out += f.flush(); |
| 10 | return out; |
| 11 | } |
| 12 | |
| 13 | describe('StreamDisplayFilter (append-only streaming)', () => { |
| 14 | it('passes plain text through unchanged', () => { |
no test coverage detected