Skip to content

Add missing test coverage for git and prompt packages #4

@tapvt

Description

@tapvt

Problem

Two critical packages are missing test files entirely:

  • internal/git/git.go - No git_test.go file
  • internal/prompt/prompt.go - No prompt_test.go file

Impact

  • No test coverage for git integration functionality
  • No test coverage for prompt generation and formatting
  • Reduces confidence in code quality and reliability
  • Makes refactoring risky

Current Status

When running make test-unit, these packages show:

Required Actions

  1. Create internal/git/git_test.go with comprehensive tests for:

    • Git repository detection
    • Branch name extraction
    • Status checking (staged, unstaged, untracked files)
    • Ahead/behind commit counting
    • Error handling
  2. Create internal/prompt/prompt_test.go with comprehensive tests for:

    • Prompt format string parsing
    • Git information integration
    • Color scheme application
    • Various prompt configurations

Files to Create

  • internal/git/git_test.go
  • internal/prompt/prompt_test.go

Priority

Critical - Test coverage is essential for code quality and maintenance.

Reference

See TODO.md item #3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcriticalCritical issues that must be fixed immediatelytestingIssues related to tests and test coverage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions