Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(cli): align tools tests with manage namespace and default empty payload

haxzie6dcd9c155669
diff --git a/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
index c925ba536..63d5b6b7f 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
@@ -631,19 +631,12 @@ describe('CLI: composio manage tools execute', () => {
)('[Given] no -d and TTY stdin [Then] defaults to empty object and executes', it => {
it.scoped('defaults to {} when no data provided', () =>
Effect.gen(function* () {
- const result = yield* cli([
- 'manage',
- 'tools',
- 'execute',
- 'GMAIL_SEND_EMAIL',
- '--user-id',
- 'default',
- ]).pipe(Effect.catchAll(e => Effect.succeed(e)));
+ yield* cli(['manage', 'tools', 'execute', 'GMAIL_SEND_EMAIL', '--user-id', 'default']);
+ const lines = yield* MockConsole.getLines({ stripAnsi: true });
+ const output = lines.join('\n');
- expect(result).toBeDefined();
- expect(result instanceof Error ? result.message : String(result)).toContain(
- 'Missing JSON input'
- );
+ expect(output).toContain('successful');
+ expect(output).toContain('executed');
})
);
});
diff --git a/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
index 85ff44b4f..524440c34 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
@@ -184,7 +184,7 @@ describe('CLI: composio manage tools search', () => {
it => {
it.scoped('CTA uses -d "{}" when no schema properties', () =>
Effect.gen(function* () {
- yield* cli(['tools', 'search', 'send']);
+ yield* cli(['manage', 'tools', 'search', 'send']);
const lines = yield* MockConsole.getLines({ stripAnsi: true });
const output = lines.join('\n');