mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
90 lines
2.6 KiB
TypeScript
90 lines
2.6 KiB
TypeScript
/**
|
|
* Integration tests for the start command
|
|
*/
|
|
|
|
import { describe, it, beforeEach, afterEach, expect } from "../test.utils";
|
|
import { startCommand } from '../../src/cli/commands/start/start-command.ts';
|
|
import { Command } from '@cliffy/command';
|
|
|
|
describe('Start Command Integration', () => {
|
|
let testDir: string;
|
|
|
|
beforeAll(async () => {
|
|
// Create test directory
|
|
testDir = await Deno.makeTempDir({ prefix: 'claude-flow-test-' });
|
|
Deno.chdir(testDir);
|
|
|
|
// Create required directories
|
|
await Deno.mkdir('memory', { recursive: true });
|
|
await Deno.mkdir('coordination', { recursive: true });
|
|
|
|
// Create minimal config
|
|
const config = {
|
|
memory: {
|
|
backend: 'json',
|
|
path: './memory/claude-flow-data.json'
|
|
},
|
|
terminal: {
|
|
poolSize: 2
|
|
},
|
|
coordination: {
|
|
maxConcurrentTasks: 5
|
|
},
|
|
mcp: {
|
|
port: 3000,
|
|
transport: 'stdio'
|
|
},
|
|
orchestrator: {
|
|
maxConcurrentTasks: 10
|
|
}
|
|
};
|
|
|
|
await Deno.writeTextFile('claude-flow.config.json', JSON.stringify(config, null, 2));
|
|
});
|
|
|
|
afterAll(async () => {
|
|
// Cleanup
|
|
try {
|
|
await Deno.remove(testDir, { recursive: true });
|
|
} catch {
|
|
// Ignore cleanup errors
|
|
}
|
|
});
|
|
|
|
describe('command structure', () => {
|
|
it('should be a valid Cliffy command', () => {
|
|
expect(startCommand).toBeDefined();
|
|
expect(startCommand instanceof Command).toBe(true);
|
|
});
|
|
|
|
it('should have correct description', () => {
|
|
const desc = (startCommand as any)._globalParent?._description ||
|
|
(startCommand as any).getDescription();
|
|
expect(typeof desc).toBe('string');
|
|
expect(desc.includes('orchestration')).toBe(true);
|
|
});
|
|
|
|
it('should have all expected options', () => {
|
|
const command = startCommand as any;
|
|
const options = command.options || command.getOptions?.() || [];
|
|
|
|
const optionNames = options.map((opt: any) => opt.name);
|
|
expect(optionNames.includes('daemon')).toBe(true);
|
|
expect(optionNames.includes('port')).toBe(true);
|
|
expect(optionNames.includes('ui')).toBe(true);
|
|
expect(optionNames.includes('verbose')).toBe(true);
|
|
});
|
|
});
|
|
|
|
describe('initialization', () => {
|
|
it('should initialize process manager without errors', async () => {
|
|
// Test that the command can be parsed without executing
|
|
const command = new Command()
|
|
.command('start', startCommand);
|
|
|
|
const help = await command.getHelp();
|
|
expect(help).toBeDefined();
|
|
expect(help.includes('start')).toBe(true);
|
|
});
|
|
});
|
|
}); |