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

Function stubBashTool

src/utils/handlePromptSubmit.submit.test.ts:48–54  ·  view source on GitHub ↗
(returnValue: Awaited<ReturnType<BashCall>> | ShellError)

Source from the content-addressed store, hash-verified

46let originalBashCall: BashCall
47
48function stubBashTool(returnValue: Awaited<ReturnType<BashCall>> | ShellError): void {
49 originalBashCall = BashTool.call
50 ;(BashTool as { call: BashCall }).call = (async () => {
51 if (returnValue instanceof Error) throw returnValue
52 return returnValue
53 }) as BashCall
54}
55
56afterEach(() => {
57 if (originalBashCall !== undefined) {

Calls

no outgoing calls

Tested by

no test coverage detected