Skip to content

[side-quest] Consolidate logging-only tests into behavior tests (T007)#303

Merged
couimet merged 1 commit intomainfrom
side-quest/consolidate-logging-only-tests
Feb 5, 2026
Merged

[side-quest] Consolidate logging-only tests into behavior tests (T007)#303
couimet merged 1 commit intomainfrom
side-quest/consolidate-logging-only-tests

Conversation

@couimet
Copy link
Owner

@couimet couimet commented Feb 5, 2026

Addresses CLAUDE.md rule T007: "Never create separate tests just for logging - consolidate with behavior tests." Logging assertions are now part of the tests that verify the corresponding behavior.

Changes:

  • ConfigReader.test.ts: Merged 2 logging-only tests into behavior tests
  • PasteDestinationManager.test.ts: Merged 4 logging-only tests into behavior tests

Test count reduced from 1374 to 1368 (6 tests consolidated).

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage for logging behavior in terminal destination management and configuration reading, verifying debug logs are properly emitted during link operations, terminal focusing, and configuration defaults.

Addresses CLAUDE.md rule T007: "Never create separate tests just for logging -
consolidate with behavior tests." Logging assertions are now part of the tests
that verify the corresponding behavior.

Changes:
- ConfigReader.test.ts: Merged 2 logging-only tests into behavior tests
- PasteDestinationManager.test.ts: Merged 4 logging-only tests into behavior tests

Test count reduced from 1374 to 1368 (6 tests consolidated).
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

Two test suites are updated to add comprehensive assertions for logger.debug and logger.warn calls. Duplicate test blocks are removed while test expectations are restructured to verify logging behavior when handling terminal destinations and configuration reads.

Changes

Cohort / File(s) Summary
Logging Assertion Updates
packages/rangelink-vscode-extension/src/__tests__/destinations/PasteDestinationManager.test.ts, packages/rangelink-vscode-extension/src/config/__tests__/ConfigReader.test.ts
Tests updated to assert debug and warning log emissions with specific context data. Logger mock clearing points added to isolate logging behavior verification. Duplicate test blocks removed and assertions restructured to align with new logging patterns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Logger calls now dance and sing,
Tests assert each debug ping,
Mock clears isolate the flow,
What gets logged, the tests now know! 🎪

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main change: consolidating logging-only tests into behavior tests, which matches the PR's stated objective of implementing CLAUDE.md rule T007.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch side-quest/consolidate-logging-only-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@couimet couimet merged commit 689e0e0 into main Feb 5, 2026
2 checks passed
@couimet couimet deleted the side-quest/consolidate-logging-only-tests branch February 5, 2026 13:38
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