## Phase 13: Testing & Validation

### 13.1 Unit Test Migration

- [x] **13.1.1** Update test configurations for Vitest at root
- [x] **13.1.2** Ensure all tests pass after package moves
- [x] **13.1.3** Update test mocks for new package paths
- [x] **13.1.4** Verify test coverage reports aggregate correctly

### 13.2 Integration Test Updates

- [x] **13.2.1** Update integration tests for new API structures
- [x] **13.2.2** Create integration tests for cross-domain calls
- [x] **13.2.3** Add contract tests between domains
- [x] **13.2.4** Verify all service integrations work

### 13.3 E2E Test Migration

- [x] **13.3.1** Replace legacy `lilith/tests/` with Playwright API E2E suite
      under `testing/e2e/tests/api/lilith/`
- [x] **13.3.2** Update Playwright configuration
- [x] **13.3.3** Update test environment setup
- [x] **13.3.4** Verify E2E tests pass

### 13.4 Mobile E2E Tests

- [x] **13.4.1** Update Detox configuration
- [x] **13.4.2** Verify mobile E2E tests pass

### 13.5 Contract Testing

- [x] **13.5.1** Set up Pact or similar for consumer-driven contracts
- [x] **13.5.2** Create contracts for Isis APIs
- [x] **13.5.3** Create contracts for Sophia APIs
- [x] **13.5.4** Create contracts for Hathor APIs
- [x] **13.5.5** Create contracts for Bellona APIs
- [x] **13.5.6** Add contract verification to CI

### 13.6 Performance Testing

- [x] **13.6.1** Migrate lilith performance tests
- [x] **13.6.2** Create load tests for capability domain APIs
- [x] **13.6.3** Benchmark cross-domain call latency
- [x] **13.6.4** Document performance baselines

### 13.7 Security Testing

- [x] **13.7.1** Run security scans on new structure
- [x] **13.7.2** Verify auth boundaries between domains
- [x] **13.7.3** Test API key isolation
- [x] **13.7.4** Verify no cross-domain data leakage

### 13.8 Boundary Validation

- [x] **13.8.1** Run Nx boundary checks
- [x] **13.8.2** Verify no cross-scope imports (except via contracts/clients)
- [x] **13.8.3** Audit dependency graph for violations
- [x] **13.8.4** Fix any boundary violations

---
