@devries-cameron20 / composio Mirror · read-only / commits / ab1d654c9
Fork 0

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, 04:30 UTC

test(cli): add test for COMPOSIO_INSTALL_DIR default fallback

Verify that when COMPOSIO_INSTALL_DIR is unset, the install command defaults to ~/.composio for the PATH block written to rc files.

jkomyno committed Mar 9, 2026 at 16:02 UTC ab1d654c9393aef26e12eedaf20743d223a1dd14
1 file changed +23
ts/packages/cli/test/src/commands/install.cmd.test.ts
+23
@@ -210,4 +210,27 @@ describe('CLI: composio install', () => {
210 );
211 });
212 });
213 +
214 + describe('[When] COMPOSIO_INSTALL_DIR is not set', () => {
215 + layer(TestLive())(it => {
216 + it.scoped('[Then] defaults to ~/.composio', () =>
217 + Effect.gen(function* () {
218 + const os = yield* NodeOs;
219 + process.env.SHELL = '/bin/zsh';
220 + delete process.env.COMPOSIO_INSTALL_DIR;
221 +
222 + yield* cli(['install']);
223 +
224 + const fs = yield* FileSystem.FileSystem;
225 + const rcPath = path.join(os.homedir, '.zshrc');
226 + const contents = yield* fs.readFileString(rcPath);
227 +
228 + // Should use ~/.composio as the default install directory
229 + expect(contents).toContain(
230 + `export COMPOSIO_INSTALL_DIR=${path.join(os.homedir, '.composio')}`
231 + );
232 + })
233 + );
234 + });
235 + });
236 });