Minimal Terminal stub — only `rows` is read by the component.
(rows: number, columns = 120)
| 16 | |
| 17 | /** Minimal Terminal stub — only `rows` is read by the component. */ |
| 18 | function fakeTerminal(rows: number, columns = 120): Terminal { |
| 19 | return { |
| 20 | start: () => {}, |
| 21 | stop: () => {}, |
| 22 | drainInput: () => Promise.resolve(), |
| 23 | write: () => {}, |
| 24 | get columns() { |
| 25 | return columns; |
| 26 | }, |
| 27 | get rows() { |
| 28 | return rows; |
| 29 | }, |
| 30 | get kittyProtocolActive() { |
| 31 | return false; |
| 32 | }, |
| 33 | moveBy: () => {}, |
| 34 | hideCursor: () => {}, |
| 35 | showCursor: () => {}, |
| 36 | clearLine: () => {}, |
| 37 | clearFromCursor: () => {}, |
| 38 | clearScreen: () => {}, |
| 39 | setTitle: () => {}, |
| 40 | setProgress: () => {}, |
| 41 | }; |
| 42 | } |
| 43 | |
| 44 | function task(overrides: Partial<BackgroundTaskInfo> = {}): BackgroundTaskInfo { |
| 45 | return { |
no test coverage detected