Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 02:00 UTC
fix(cli): align tools tests with manage namespace and default empty payload
Update execute and search command tests to match current CLI behavior: `manage` command routing and `{}` default input when no `--data` is provided. Made-with: Cursor
haxzie committed
Mar 19, 2026 at 12:38 UTC
6dcd9c155669051facc591f16be71f946db96882
2 files changed
+6
-13
ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
+5
-12
@@ -631,19 +631,12 @@ describe('CLI: composio manage tools execute', () => {
631
)('[Given] no -d and TTY stdin [Then] defaults to empty object and executes', it => {
632
it.scoped('defaults to {} when no data provided', () =>
633
Effect.gen(function* () {
634
- const result = yield* cli([
635
- 'manage',
636
- 'tools',
637
- 'execute',
638
- 'GMAIL_SEND_EMAIL',
639
- '--user-id',
640
- 'default',
641
- ]).pipe(Effect.catchAll(e => Effect.succeed(e)));
634
+ yield* cli(['manage', 'tools', 'execute', 'GMAIL_SEND_EMAIL', '--user-id', 'default']);
635
+ const lines = yield* MockConsole.getLines({ stripAnsi: true });
636
+ const output = lines.join('\n');
637
643
- expect(result).toBeDefined();
644
- expect(result instanceof Error ? result.message : String(result)).toContain(
645
- 'Missing JSON input'
646
- );
638
+ expect(output).toContain('successful');
639
+ expect(output).toContain('executed');
640
})
641
);
642
});
ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
+1
-1
@@ -184,7 +184,7 @@ describe('CLI: composio manage tools search', () => {
184
it => {
185
it.scoped('CTA uses -d "{}" when no schema properties', () =>
186
Effect.gen(function* () {
187
- yield* cli(['tools', 'search', 'send']);
187
+ yield* cli(['manage', 'tools', 'search', 'send']);
188
const lines = yield* MockConsole.getLines({ stripAnsi: true });
189
const output = lines.join('\n');
190