Render the component and return the props captured from AppRenderer. The * required handlers are read off the captured props with their real types.
(props: {
bridge?: McpAppBridge
toolInput?: Record<string, unknown>
})
| 49 | /** Render the component and return the props captured from AppRenderer. The |
| 50 | * required handlers are read off the captured props with their real types. */ |
| 51 | function renderAndCapture(props: { |
| 52 | bridge?: McpAppBridge |
| 53 | toolInput?: Record<string, unknown> |
| 54 | }) { |
| 55 | capturedProps = {} |
| 56 | render( |
| 57 | <MCPAppResource |
| 58 | part={fakePart} |
| 59 | bridge={props.bridge} |
| 60 | sandbox={fakeSandbox} |
| 61 | toolInput={props.toolInput} |
| 62 | />, |
| 63 | ) |
| 64 | return capturedProps |
| 65 | } |
| 66 | |
| 67 | /** The text of the first content block, asserting it is a text block. */ |
| 68 | function firstText(result: CallToolResult): string { |
no test coverage detected