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, it, expect } from 'vitest'; |
| 2 | import { getJsInstallCommand, getPythonInstallCommand } from 'src/effects/core-dependency'; |
| 3 | |
| 4 | describe('core-dependency', () => { |
| 5 | describe('getJsInstallCommand', () => { |
| 6 | it('[Given] pnpm [Then] returns "pnpm add <dep>"', () => { |
| 7 | expect(getJsInstallCommand('pnpm', '@composio/core')).toBe('pnpm add @composio/core'); |
| 8 | }); |
| 9 | |
| 10 | it('[Given] npm [Then] returns "npm install -S <dep>"', () => { |
| 11 | expect(getJsInstallCommand('npm', '@composio/core')).toBe('npm install -S @composio/core'); |
| 12 | }); |
| 13 | |
| 14 | it('[Given] yarn [Then] returns "yarn add <dep>"', () => { |
| 15 | expect(getJsInstallCommand('yarn', '@composio/core')).toBe('yarn add @composio/core'); |
| 16 | }); |
| 17 | |
| 18 | it('[Given] bun [Then] returns "bun add <dep>"', () => { |
| 19 | expect(getJsInstallCommand('bun', '@composio/core')).toBe('bun add @composio/core'); |
| 20 | }); |
| 21 | |
| 22 | it('[Given] deno [Then] returns "deno add npm:<dep>"', () => { |
| 23 | expect(getJsInstallCommand('deno', '@composio/core')).toBe('deno add npm:@composio/core'); |
| 24 | }); |
| 25 | }); |
| 26 | |
| 27 | describe('getPythonInstallCommand', () => { |
| 28 | it('[Given] uv [Then] returns "uv pip install <dep>"', () => { |
| 29 | expect(getPythonInstallCommand('uv', 'composio')).toBe('uv pip install composio'); |
| 30 | }); |
| 31 | |
| 32 | it('[Given] pip [Then] returns "pip install <dep>"', () => { |
| 33 | expect(getPythonInstallCommand('pip', 'composio')).toBe('pip install composio'); |
| 34 | }); |
| 35 | }); |
| 36 | }); |