Skip to content

test: add daemon handler tests for improved coverage#330

Merged
dlorenc merged 1 commit intomainfrom
multiclaude/eager-badger
Jan 28, 2026
Merged

test: add daemon handler tests for improved coverage#330
dlorenc merged 1 commit intomainfrom
multiclaude/eager-badger

Conversation

@dlorenc
Copy link
Copy Markdown
Owner

@dlorenc dlorenc commented Jan 28, 2026

Summary

  • Add comprehensive tests for daemon handlers with low or zero coverage
  • Tests focus on argument validation and error handling paths
  • Use table-driven patterns consistent with existing codebase tests

Coverage Improvements

Handler Before After
handleTriggerRefresh 0% 100%
handleTaskHistory Partial 100%
handleUpdateRepoConfig Partial 89.5%
handleGetRepoConfig Partial 92.9%
handleListAgents Partial 82.1%

New Test Cases

  • TestHandleTriggerRefresh - verifies trigger returns success
  • TestHandleRestartAgentTableDriven - tests validation errors
  • TestHandleSpawnAgentTableDriven - tests argument validation and error cases
  • TestHandleRepairStateBasic - tests basic repair functionality
  • TestHandleTaskHistoryTableDriven - tests with filters and limits
  • TestHandleListAgentsTableDriven - tests with multiple agents
  • TestHandleUpdateRepoConfigTableDriven - tests merge queue and PR shepherd settings
  • TestHandleGetRepoConfigTableDriven - tests validation and success cases

Test plan

  • All existing tests pass
  • New tests pass locally
  • Coverage improvements verified

🤖 Generated with Claude Code

Add comprehensive tests for daemon handlers with low coverage:
- handleTriggerRefresh (0% → 100%)
- handleRestartAgent (validation error paths)
- handleSpawnAgent (argument validation and error cases)
- handleRepairState (basic functionality)
- handleTaskHistory (with filters and limits)
- handleListAgents (with multiple agents)
- handleUpdateRepoConfig (merge queue and PR shepherd settings)
- handleGetRepoConfig (validation and success cases)

The tests use table-driven patterns consistent with existing tests
and focus on testing argument validation and error handling paths
that don't require actual tmux or Claude process startup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dlorenc dlorenc added the multiclaude PRs created by multiclaude workers label Jan 28, 2026
@dlorenc dlorenc merged commit f2820ea into main Jan 28, 2026
6 checks passed
aronchick pushed a commit to aronchick/multiclaude that referenced this pull request Jan 29, 2026
Add comprehensive tests for daemon handlers with low coverage:
- handleTriggerRefresh (0% → 100%)
- handleRestartAgent (validation error paths)
- handleSpawnAgent (argument validation and error cases)
- handleRepairState (basic functionality)
- handleTaskHistory (with filters and limits)
- handleListAgents (with multiple agents)
- handleUpdateRepoConfig (merge queue and PR shepherd settings)
- handleGetRepoConfig (validation and success cases)

The tests use table-driven patterns consistent with existing tests
and focus on testing argument validation and error handling paths
that don't require actual tmux or Claude process startup.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multiclaude PRs created by multiclaude workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant