spawn/cli/src
A 6bfdb7da54
fix: add missing text and autocomplete mocks to cmd-interactive tests (#1438)
* fix: add missing text and autocomplete mocks to cmd-interactive tests

17 tests in cmd-interactive.test.ts were failing with
"p.text is not a function" because the @clack/prompts mock didn't
include the text() prompt (added for spawn name input) or
autocomplete() (used for agent selection). Adds both mocks to restore
full test coverage of cmdInteractive.

Agent: code-health
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: update stale version strings in update-check tests

The update-check tests mock "latest" version as 0.3.0, but the current
CLI version is 0.5.2. Since 0.3.0 < 0.5.2, compareVersions returns
false and the auto-update logic never fires, causing 5 tests to fail.
Replace mock version with 99.0.0 to future-proof against further bumps.

Agent: test-engineer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 04:22:38 -05:00
..
__tests__ fix: add missing text and autocomplete mocks to cmd-interactive tests (#1438) 2026-02-18 04:22:38 -05:00
commands.ts feat: remove Oracle Cloud, add featured_cloud per agent (#1430) 2026-02-17 22:52:41 -08:00
guidance-data.ts refactor: extract error guidance data structures into separate module (#1335) 2026-02-16 19:45:28 -08:00
history.ts security: fix path traversal risk in SPAWN_HOME validation (#1402) 2026-02-17 12:57:01 -05:00
index.ts feat: add headless SDK mode for programmatic provisioning (#1420) 2026-02-17 15:32:14 -05:00
manifest.ts feat: remove Oracle Cloud, add featured_cloud per agent (#1430) 2026-02-17 22:52:41 -08:00
security.ts security: fix incomplete command injection detection in prompt validation (#1401) 2026-02-17 11:51:33 -05:00
unicode-detect.ts fix: Switch build target from node to bun to fix UTF-8 mojibake 2026-02-10 09:36:28 +00:00
update-check.ts fix: prevent command injection in update-check reExecWithArgs (#951) 2026-02-13 08:34:04 -08:00