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

Function renderDiffDetail

src/components/diff/DiffDetailView.test.tsx:120–135  ·  view source on GitHub ↗
(props: React.ComponentProps<typeof DiffDetailView>)

Source from the content-addressed store, hash-verified

118}
119
120async function renderDiffDetail(props: React.ComponentProps<typeof DiffDetailView>) {
121 const terminal = createFakeTerminal()
122 liveRoot = await createRoot({
123 stdout: terminal.stdout,
124 stdin: terminal.stdin,
125 stderr: terminal.stderr,
126 exitOnCtrlC: false,
127 patchConsole: false,
128 })
129 liveRoot.render(<DiffDetailView {...props} />)
130 await waitFor(
131 () => terminal.getOutput().length > 0,
132 'DiffDetailView never produced output',
133 )
134 return terminal
135}
136
137function normalizeTerminalOutput(output: string): string {
138 return stripAnsi(output).replace(/\s+/g, '').trim()

Callers 1

Calls 4

createFakeTerminalFunction · 0.70
waitForFunction · 0.70
createRootFunction · 0.50
renderMethod · 0.45

Tested by

no test coverage detected