MCPcopy Create free account
hub / github.com/Noumena-Network/code / makeProps

Function makeProps

src/ink/components/App.handleReadable.test.ts:14–45  ·  view source on GitHub ↗
(stdin: NodeJS.ReadStream, onStdinResume?: () => void)

Source from the content-addressed store, hash-verified

12}
13
14function 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
47describe('App.handleReadable stdin-resume gap detection', () => {
48 test('does not treat the first stdin chunk after startup as a resume gap', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected