(stdin: NodeJS.ReadStream, onStdinResume?: () => void)
| 12 | } |
| 13 | |
| 14 | function makeProps(stdin: NodeJS.ReadStream, onStdinResume?: () => void) { |
| 15 | return { |
| 16 | children: null as React.ReactNode, |
| 17 | stdin, |
| 18 | stdout: { isTTY: true, write() {} } as unknown as NodeJS.WriteStream, |
| 19 | stderr: { isTTY: true, write() {} } as unknown as NodeJS.WriteStream, |
| 20 | exitOnCtrlC: false, |
| 21 | onExit() {}, |
| 22 | terminalColumns: 80, |
| 23 | terminalRows: 24, |
| 24 | selection: { |
| 25 | start: null, |
| 26 | end: null, |
| 27 | mode: 'char', |
| 28 | isDragging: false, |
| 29 | }, |
| 30 | onSelectionChange() {}, |
| 31 | onClickAt() { |
| 32 | return false |
| 33 | }, |
| 34 | onHoverAt() {}, |
| 35 | getHyperlinkAt() { |
| 36 | return undefined |
| 37 | }, |
| 38 | onOpenHyperlink() {}, |
| 39 | onMultiClick() {}, |
| 40 | onSelectionDrag() {}, |
| 41 | onStdinResume, |
| 42 | onCursorDeclaration() {}, |
| 43 | dispatchKeyboardEvent() {}, |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | describe('App.handleReadable stdin-resume gap detection', () => { |
| 48 | test('does not treat the first stdin chunk after startup as a resume gap', () => { |
no outgoing calls
no test coverage detected