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

Function createFakeTerminal

src/ink/replPerfHarness.tsx:134–150  ·  view source on GitHub ↗
(columns = 80, rows = 24)

Source from the content-addressed store, hash-verified

132}
133
134export function createFakeTerminal(columns = 80, rows = 24): FakeTerminal {
135 let output = ''
136 const stdout = createFakeOutput(columns, rows)
137 const stderr = createFakeOutput(columns, rows)
138 stdout.on('data', chunk => {
139 output += chunk.toString()
140 })
141 return {
142 stdin: createFakeInput(),
143 stdout,
144 stderr,
145 clearOutput: () => {
146 output = ''
147 },
148 getOutput: () => output,
149 }
150}
151
152export async function waitFor(
153 predicate: () => boolean,

Callers 5

mountMarkdownFunction · 0.70
mountNodeFunction · 0.70
mountReplFunction · 0.70
mountHighlightedCodeFunction · 0.70
mountMountedComponentFunction · 0.50

Calls 3

createFakeOutputFunction · 0.70
createFakeInputFunction · 0.70
toStringMethod · 0.65

Tested by 1

mountNodeFunction · 0.56