Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

Removed facile test verbosity to improve code readability:

  • Doc comments (~236 lines): Removed /// Test X comments that just restated test names
  • Test names (9 functions): Shortened overly verbose names (e.g., test_merge_when_primary_not_on_default_but_default_has_worktreetest_merge_primary_not_on_default_with_default_worktree)
  • Assertion messages (19 instances): Removed messages that restate the check (e.g., assert!(path.exists(), "Path should exist")assert!(path.exists()))

Kept messages that add semantic meaning (e.g., "hook should have run") or debugging context.

Test plan

  • All 723 integration tests passing
  • All 401 unit tests passing
  • Pre-merge hooks passing (linting, formatting, doctests)

Total: 279 lines removed across 31 files.

🤖 Generated with Claude Code

max-sixty and others added 3 commits January 6, 2026 15:49
Remove verbose assertion messages that repeat the condition being tested.
Messages like "Should contain indicator" when asserting `contains("●")` are
redundant since the code is self-documenting. This reduces noise in tests
while maintaining clarity through meaningful assertion failures.
Removed facile test verbosity across three categories:

1. **Doc comments** (~236 lines): Removed `/// Test X` comments that just
   restated test function names. Kept multi-line explanations that add context.

2. **Test names** (9 functions): Shortened overly verbose names by removing
   filler words while maintaining clarity:
   - test_merge_when_primary_not_on_default_but_default_has_worktree →
     test_merge_primary_not_on_default_with_default_worktree
   - test_complete_switch_option_prefix_shows_options_not_branches →
     test_complete_switch_option_prefix_shows_options

3. **Assertion messages** (19 instances): Removed messages that just restate
   the check:
   - assert!(path.exists(), "Path should exist") → assert!(path.exists())
   - assert!(x.is_file(), "Should be a file") → assert!(x.is_file())

Kept messages that add semantic meaning (e.g., "hook should have run") or
include debugging variables.

Total: 279 lines removed across 31 files. All 723 integration + 401 unit tests
passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@max-sixty max-sixty merged commit 928b301 into main Jan 7, 2026
17 checks passed
@max-sixty max-sixty deleted the asserts branch January 7, 2026 00:51
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.

2 participants