Skip to content

Add unit tests for modules/status (0% to 90.9% coverage) - #2143

Open
Seanstoppable wants to merge 1 commit into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-status-test-coverage
Open

Add unit tests for modules/status (0% to 90.9% coverage)#2143
Seanstoppable wants to merge 1 commit into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-status-test-coverage

Conversation

@Seanstoppable

Copy link
Copy Markdown
Collaborator

Adds table-driven unit tests for the modules/status package, bringing test coverage from 0% to 90.9%.

Tests cover:

  • animation() icon cycling through all 5 frames
  • Wrap-around from last icon back to first
  • Title returned from animation() matches settings
  • Full animation cycle + continuation verification
  • NewWidget initial state
  • NewSettingsFromYAML configuration parsing (title, focusable defaults)

The only uncovered function is Refresh() (1 statement) which delegates to widget.Redraw() requiring a full TUI.

Table-driven tests covering:
- animation() icon cycling and wrap-around behavior
- animation() title return value
- Full animation cycle verification
- NewWidget initial state
- NewSettingsFromYAML configuration parsing
@Seanstoppable
Seanstoppable force-pushed the seanstoppable-status-test-coverage branch from 25149d2 to e001cb4 Compare July 26, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant