Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | import { describe, expect, layer } from '@effect/vitest'; |
| 2 | import { Effect } from 'effect'; |
| 3 | import { renderCommandHintGraph } from 'src/services/command-hints'; |
| 4 | import { cli, MockConsole, TestLive } from 'test/__utils__'; |
| 5 | |
| 6 | describe('CLI: composio debug generate-graph', () => { |
| 7 | layer(TestLive())(it => { |
| 8 | it.effect('[Then] prints the command-hint graph as indented JSON on stdout', () => |
| 9 | Effect.gen(function* () { |
| 10 | yield* cli(['debug', 'generate-graph']); |
| 11 | |
| 12 | expect(yield* MockConsole.getLines({ stream: 'stdout' })).toEqual([ |
| 13 | JSON.stringify(renderCommandHintGraph(), null, 2), |
| 14 | ]); |
| 15 | expect(yield* MockConsole.getLines({ stream: 'stderr' })).toEqual([]); |
| 16 | }) |
| 17 | ); |
| 18 | }); |
| 19 | }); |