()
| 24 | |
| 25 | it('handles input arriving in multiple chunks', async () => { |
| 26 | async function* gen() { |
| 27 | yield 'foo'; |
| 28 | yield 'bar'; |
| 29 | yield '\n'; |
| 30 | } |
| 31 | const input = Readable.from(gen()); |
| 32 | const output = new CaptureStream(); |
| 33 | expect(await promptText('? ', { input, output })).toBe('foobar'); |