Files
Lukas May 34578d39c6 refactor: Restructure monorepo to apps/server/ and apps/web/ layout
Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt
standard monorepo conventions (apps/ for runnable apps, packages/
for reusable libraries). Update all config files, shared package
imports, test fixtures, and documentation to reflect new paths.

Key fixes:
- Update workspace config to ["apps/*", "packages/*"]
- Update tsconfig.json rootDir/include for apps/server/
- Add apps/web/** to vitest exclude list
- Update drizzle.config.ts schema path
- Fix ensure-schema.ts migration path detection (3 levels up in dev,
  2 levels up in dist)
- Fix tests/integration/cli-server.test.ts import paths
- Update packages/shared imports to apps/server/ paths
- Update all docs/ files with new paths
2026-03-03 11:22:53 +01:00

57 lines
1.7 KiB
TypeScript

/**
* Real Provider Integration Tests
*
* This module provides infrastructure for testing against real CLI providers.
* Tests are expensive (real API calls) and skipped by default.
*
* ## Running Tests
*
* ```bash
* # Claude tests only
* REAL_CLAUDE_TESTS=1 npm test -- src/test/integration/real-providers/ --test-timeout=300000
*
* # Codex tests only
* REAL_CODEX_TESTS=1 npm test -- src/test/integration/real-providers/codex-manager.test.ts
*
* # All real provider tests
* REAL_CLAUDE_TESTS=1 REAL_CODEX_TESTS=1 npm test -- src/test/integration/real-providers/
* ```
*
* ## Cost Estimates
*
* | Suite | Tests | Est. Cost | Duration |
* |-------|-------|-----------|----------|
* | Output Parsing | 3 | $0.06 | ~2 min |
* | Schema Validation | 4 | $0.22 | ~4 min |
* | Crash Recovery | 3 | $0.08 | ~3 min |
* | Session Resume | 2 | $0.08 | ~3 min |
* | Codex Integration | 2 | $0.10 | ~2 min |
* | **TOTAL** | **14** | **~$0.54** | **~14 min** |
*
* ## Test Files
*
* - `harness.ts` - RealProviderHarness factory and utilities
* - `prompts.ts` - Minimal cost test prompts
* - `claude-manager.test.ts` - Claude spawn/resume/output tests
* - `codex-manager.test.ts` - Codex provider tests
* - `schema-retry.test.ts` - Schema validation + retry tests
* - `crash-recovery.test.ts` - Server restart simulation
* - `sample-outputs/` - Captured CLI output for parser unit tests
*/
export {
createRealProviderHarness,
CapturingEventBus,
sleep,
shouldRunRealClaudeTests,
shouldRunRealCodexTests,
describeRealClaude,
describeRealCodex,
REAL_TEST_TIMEOUT,
EXTENDED_TEST_TIMEOUT,
type RealProviderHarness,
type RealProviderHarnessOptions,
} from './harness.js';
export { MINIMAL_PROMPTS, CODEX_PROMPTS } from './prompts.js';