Files
msd-core/tests
Ethan Hurst c027fe6542 test(07-02): add cmdCommit and cmdWebsearch tests for commands.cjs
cmdCommit tests (5 cases) with real git repos via createTempGitProject:
- commit_docs=false skip, .planning gitignored skip, nothing-to-commit
- Successful commit with hash and git log verification
- Amend mode with commit count verification

cmdWebsearch tests (6 cases) with fetch mocking and stdout interception:
- No API key returns available=false, no query returns error
- Successful response with correct result shape
- URL parameter construction verification
- API error (non-200) handling, network failure handling

Covers requirements CMD-04, CMD-05.
2026-02-26 05:47:33 +10:00
..