Skip to content

test: add comprehensive unit tests (17 files, 297 new tests)#134

Merged
zbigniewsobiecki merged 1 commit intomainfrom
dev
Feb 11, 2026
Merged

test: add comprehensive unit tests (17 files, 297 new tests)#134
zbigniewsobiecki merged 1 commit intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Merge dev → main: comprehensive unit test coverage additions.

  • Add 17 new test files covering previously untested modules
  • Increase test count from 139 to 436 (+297 tests)
  • Increase line coverage from 16.4% to 29.2%
  • Achieve 100% coverage on github/client.ts, types.ts, llmLogging.ts, llmMetrics.ts, safeOperation.ts, repo.ts

See PR #133 for full details.

🤖 Generated with Claude Code

…g, and utils (#133)

Add 17 new test files covering previously untested modules, increasing
test count from 139 to 436 and line coverage from 16.4% to 29.2%.

Tier 1 - Triggers and core logic (10 files):
- GitHub type guards: all 5 validators with valid/invalid/edge cases
- PR opened: matches(), handle() with Trello URL extraction
- Check suite success: CI pass detection, PR fetching, check verification
- Check suite failure: failure detection, attempt tracking, max retries
- PR review submitted: self-review skip, bot detection, auth fallback
- Issue comment: PR vs issue distinction, self-comment skip
- PR review comment: file path extraction, auth error tolerance
- PR ready to merge: dual-trigger (check_suite + review), merge readiness
- Projects config: load/cache/clear lifecycle, finder functions, tokens
- Safe operation: error swallowing with/without logging

Tier 2 - Client, utils, and gadgets (7 files):
- GitHub client: all 15+ Octokit methods with response mapping
- LLM metrics: cost calculation, token estimation, structured logging
- Todo storage: init/load/save/format with fs mocking
- Lifecycle: timer management, watchdog, shutdown scheduling
- Attachment added: zip pattern parsing, user verification, debug loop prevention
- Repo utils: workspace dirs, temp dirs, clone, runCommand with spawn mocking
- LLM logging: call number formatting, request/response file logging

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit ececfdd into main Feb 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant