indiana91/devstandup

Add Unit Tests for Git Analyzer

Aperta

#4 aperta il 2 ott 2025

 (1 commento) (0 reazioni) (0 assegnatari) (0 fork)auto 404
good first issue

Metriche repository

Star
 (1 stella)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Write unit tests for the internal/git/analyzer.go file to ensure commit analysis works correctly.

Tasks:

  • Create analyzer_test.go file
  • Write test for parsing commit messages
  • Write test for calculating statistics (additions, deletions)
  • Write test for filtering commits by date range
  • Write test for filtering commits by author
  • Achieve at least 80% code coverage

Acceptance Criteria:

  • All tests pass with go test ./internal/git/...
  • Code coverage is at least 80%
  • Tests include edge cases (empty repos, no commits, etc.)

Resources:

Guida contributor