Skip to content

Fix vacuous color assertions in TestSummarizeChecks #103

@joshuacrass

Description

@joshuacrass

Problem:
In main_test.go, TestSummarizeChecks asserts against expressions like colorGreen + "✓" + colorReset. However, colorGreen and colorReset are defined as empty strings ("") in render.go as legacy compatibility constants. The test therefore asserts that summarizeChecks returns "✓" — which is true whether or not any colour is applied. The test would pass even if summarizeChecks returned a plain uncoloured string, making it useless for verifying that ANSI colour codes are correctly applied.

Solution:
Update the test to assert against the actual styled output using lipgloss style rendering, or — if colour is not the concern — assert only against the text content and document why colour is excluded from the assertion.

Acceptance Criteria:

  • TestSummarizeChecks asserts against the actual styled output, not against empty-string colour constants
  • The test fails if summarizeChecks stops applying colour to its output
  • go test ./... passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort:1Very small effort (< 1 hour)priority:lowLow priority - nice to havetype:bugBug fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions