agent-orchestrator/packages/cli/__tests__
Prateek 080bd1d5fd fix: resolve webpack build error and eliminate mock duplication in tests
Two fixes:
1. perf/route.ts was importing request-logger.js via relative path with .js
   extension. Next.js webpack can't resolve this — use @/lib/request-logger
   alias like all other API routes do. Fixes CI Typecheck and Fresh Onboarding.

2. perf.test.ts and observability-routes.test.ts contained ~100 lines of
   inline mock implementations duplicating computeApiStats and parseApiLogs
   from core. These are tested in log-reader.test.ts. Removed the duplication:
   - perf.test.ts: drop @composio/ao-core mock entirely; use real pure fns
   - observability-routes.test.ts: mock request-logger.js at the module
     boundary (getRequestStats), replace 9 behavioral tests with 7 focused
     HTTP-contract tests (JSON shape, param forwarding, error handling)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 19:34:33 +05:30
..
commands fix: resolve webpack build error and eliminate mock duplication in tests 2026-02-20 19:34:33 +05:30
lib fix: add eslint-disable for no-control-regex in ANSI test 2026-02-20 19:34:33 +05:30