Skip to content

Test: Add unit tests for clone.go and list.go output functions #5

@rbansal42

Description

@rbansal42

Description

The clone.go and list.go files in internal/cmd/repo/ have functions that lack unit test coverage.

Missing Tests

clone.go

  • extractRepoNameFromURL - URL parsing for various formats
  • isURL - URL detection logic
  • Edge cases for malformed URLs

list.go

  • Output formatting functions
  • Table rendering with various data sets
  • Edge cases for empty results

Acceptance Criteria

  • Add tests for extractRepoNameFromURL with SSH and HTTPS URLs
  • Add tests for isURL with various input formats
  • Add tests for list output formatting
  • Achieve >80% coverage for these files

Labels

  • testing
  • good-first-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions