test: add comprehensive unit tests (17 files, 297 new tests)#133
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 11, 2026
Merged
test: add comprehensive unit tests (17 files, 297 new tests)#133zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
…g, and utils 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github/client.ts,types.ts,llmLogging.ts,llmMetrics.ts,safeOperation.ts,repo.tsWhat's covered
Tier 1 - Triggers and core logic (10 files)
github-types.test.tstriggers/github/types.tspr-opened.test.tstriggers/github/pr-opened.tscheck-suite-success.test.tstriggers/github/check-suite-success.tscheck-suite-failure.test.tstriggers/github/check-suite-failure.tspr-review-submitted.test.tstriggers/github/pr-review-submitted.tsissue-comment.test.tstriggers/github/issue-comment.tspr-review-comment.test.tstriggers/github/pr-review-comment.tspr-ready-to-merge.test.tstriggers/github/pr-ready-to-merge.tsprojects.test.tsconfig/projects.tssafeOperation.test.tsutils/safeOperation.tsTier 2 - Client, utils, and gadgets (7 files)
client.test.tsgithub/client.tsllmMetrics.test.tsutils/llmMetrics.tstodo-storage.test.tsgadgets/todo/storage.tslifecycle.test.tsutils/lifecycle.tsattachment-added.test.tstriggers/trello/attachment-added.tsrepo.test.tsutils/repo.tsllmLogging.test.tsutils/llmLogging.tsTest plan
🤖 Generated with Claude Code