(columns = 80, rows = 20)
| 90 | } |
| 91 | |
| 92 | function createFakeTerminal(columns = 80, rows = 20): FakeTerminal { |
| 93 | let output = '' |
| 94 | const stdout = createFakeOutput(columns, rows) |
| 95 | const stderr = createFakeOutput(columns, rows) |
| 96 | stdout.on('data', chunk => { |
| 97 | output += chunk.toString() |
| 98 | }) |
| 99 | return { |
| 100 | stdin: createFakeInput(), |
| 101 | stdout, |
| 102 | stderr, |
| 103 | getOutput: () => output, |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | async function waitFor( |
| 108 | predicate: () => boolean, |
no test coverage detected