test: cover post_info and notify_slack edge cases#22
Draft
Koan-Bot wants to merge 1 commit into
Draft
Conversation
Add t/edge-cases.t as a standalone test file covering gaps found in the existing test suite: - post_info (string, title+text, custom color) — the only post_* method without any test coverage - post() with too many args — error path untested - notify_slack single-arg path — public API, different code path - notify_slack 'content' alias for text field - post_end with 0 elapsed — verifies no run time suffix - notify_slack with zero and odd args — error paths Separate file avoids conflicts with open PRs touching t/hooks.t. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
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.
What
New test file
t/edge-cases.tcovering gaps in the existing test suite.Why
post_infowas the onlypost_*method with zero test coverage. Severalnotify_slackcode paths (single-arg, content alias, error cases) and the 0-elapsedpost_endedge case were also untested.How
Standalone test file — doesn't touch
t/hooks.t, so it's conflict-free with all 5 open PRs that modify that file. Same mock pattern as the existing test.Testing
All tests pass locally (
prove -Ilib -v t/edge-cases.t+ full suite).Coverage added:
post_info(string, title+text, custom color)post()with 2+ args (error path)notify_slacksingle string argnotify_slackcontent aliaspost_endwith 0 elapsed (no run time suffix)notify_slackzero/odd args (error paths)🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 219 insertions(+)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline