perf(cli): cut test suite from 32s to 11s wall

Two heavy CLI tests were dominating wall time:
- chat.test.ts "--once exits with timeout note" waited the real 30s
  reply-timeout floor. Added a replyTimeoutMs option to
  runChatInteractive so the test can use 200ms.
- bundled-plugin-install.test.ts "loads the real bundled dependency
  graph plugin" runs esbuild and a live PluginLoader (~18s). Gated
  behind FUSION_RUN_SLOW_TESTS=1; the install/upgrade logic is covered
  by mocked unit tests in the same file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-17 22:47:53 -07:00
parent 1f0bb7e018
commit f40accd4bc
4 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Make CLI test suite ~3× faster: add a `replyTimeoutMs` option to `runChatInteractive` so the `--once` timeout test no longer waits a real 30s for "No reply within 30s", and gate the heavyweight esbuild-bundled-plugin integration test behind `FUSION_RUN_SLOW_TESTS=1` (the same install/upgrade logic is covered by mocked unit tests in the same file).