test(cli): add zx TDD infrastructure and phase 1 tests

- Install zx as devDependency for E2E testing
- Create tests/ directory with setup utilities
- Add setup.ts with test context helpers:
  - Random port generation (never 6767)
  - Temp directory creation for PASEO_HOME and workDir
  - Daemon startup/waitForDaemon helper (WebSocket only)
  - Cleanup function
  - paseo() helper to run CLI commands against test daemon
- Add Phase 1 foundation tests (01-foundation.test.mts):
  - Test paseo --version outputs version
  - Test paseo --help shows commands
- Add test runner (run-all.mts) that discovers and runs all tests
- Add test:e2e script to package.json
This commit is contained in:
Mohamed Boudra
2026-01-28 22:47:08 +07:00
parent 6781c1b888
commit 6fd4214466
14 changed files with 664 additions and 12 deletions
+4 -7
View File
@@ -1,4 +1,5 @@
import { Command } from 'commander'
import { createDaemonCommand } from './commands/daemon/index.js'
const VERSION = '0.1.0'
@@ -10,7 +11,7 @@ export function createCli(): Command {
.description('Paseo CLI - control your AI coding agents from the command line')
.version(VERSION, '-v, --version', 'output the version number')
// Placeholder subcommands for Phase 1
// Placeholder subcommands
program
.command('agent')
.description('Manage agents')
@@ -18,12 +19,8 @@ export function createCli(): Command {
console.log('agent command (not yet implemented)')
})
program
.command('daemon')
.description('Manage the Paseo daemon')
.action(() => {
console.log('daemon command (not yet implemented)')
})
// Real daemon command
program.addCommand(createDaemonCommand())
program
.command('permit')