Skip to main content
Glama
deleonio
by deleonio
handle-dependency.spec.ts722 B
import assert from 'node:assert'; import { HandleDependencyTask } from '../src/migrate/runner/tasks/common/HandleDependencyTask'; describe('HandleDependencyTask', () => { it('calls package manager with dependencies', async () => { const childProc = require('child_process'); const original = childProc.execSync; let commands: string[] = []; (childProc as any).execSync = (cmd: string) => { commands.push(cmd); return Buffer.from(''); }; const task = HandleDependencyTask.getInstance('add', { lodash: '1.0.0' }, { mocha: '2.0.0' }, '^1'); task.run(); (childProc as any).execSync = original; assert.ok(commands[0].includes('add')); // first call assert.ok(commands[1].includes('-D')); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server