Skip to content

Conversation

@guiandmag
Copy link
Contributor

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to ArchUnitNode?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

….test.ts

- Fix violation object structure (add 'rule' property, use Severity enum)
- Fix method calls to use correct fluent API methods
- Fix report generator calls to include required options parameter
- Add missing imports (Severity, ReportFormat)
- Remove tests for non-existent methods
- Fix ViolationFormatter static method usage
- Fix Markdown report title expectation (use actual title from generator)
- Fix RuleComposer.not test expectation (invert logic correctly)
- Fix Performance test cleanup (use rmSync instead of rmdirSync)
- All 299 tests now pass successfully
- Document current coverage: 47.45% lines
- Define target: 80% code coverage
- Create 4-phase implementation plan
- Prioritize modules by impact and effort
- Estimate 2-3 weeks to reach target
- Provide test quality standards and best practices
- ErrorHandler.test.ts: 45 tests, 100% coverage
  - All error types (config, filesystem, git, analysis, validation, unknown)
  - Error formatting with and without colors
  - Violations summary and individual formatting
  - Path shortening and grouping
  - Factory functions

- ProgressBar.test.ts: 45 tests, comprehensive coverage
  - ProgressBar: constructor, update, increment, complete, ETA, rendering
  - Spinner: start, stop, update, animation frames
  - MultiProgressBar: add, update, increment, complete, completeAll

Total: 90 new comprehensive tests
ErrorHandler coverage: 100%
ProgressBar coverage: ~90%+

CLI module coverage improved from 0-40% to 46%+
@guiandmag guiandmag merged commit 4fde1fc into master Nov 18, 2025
1 of 5 checks passed
@guiandmag guiandmag deleted the claude/improve-test-coverage-01HgpZTxwitceiSYxTXB732C branch November 18, 2025 19:06
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