Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
test(cli): add test for COMPOSIO_INSTALL_DIR default fallback
jkomynoab1d654c9393
diff --git a/ts/packages/cli/test/src/commands/install.cmd.test.ts b/ts/packages/cli/test/src/commands/install.cmd.test.tsindex d67b95cd4..03490c3d7 100644--- a/ts/packages/cli/test/src/commands/install.cmd.test.ts+++ b/ts/packages/cli/test/src/commands/install.cmd.test.ts@@ -210,4 +210,27 @@ describe('CLI: composio install', () => {);});});++ describe('[When] COMPOSIO_INSTALL_DIR is not set', () => {+ layer(TestLive())(it => {+ it.scoped('[Then] defaults to ~/.composio', () =>+ Effect.gen(function* () {+ const os = yield* NodeOs;+ process.env.SHELL = '/bin/zsh';+ delete process.env.COMPOSIO_INSTALL_DIR;++ yield* cli(['install']);++ const fs = yield* FileSystem.FileSystem;+ const rcPath = path.join(os.homedir, '.zshrc');+ const contents = yield* fs.readFileString(rcPath);++ // Should use ~/.composio as the default install directory+ expect(contents).toContain(+ `export COMPOSIO_INSTALL_DIR=${path.join(os.homedir, '.composio')}`+ );+ })+ );+ });+ });});